Skip to content

Commit d319b0a

Browse files
committed
refactor: refine LeetCode 83 visualization steps and switch Prism.js theme to vendored asset
1 parent b10c6c9 commit d319b0a

2 files changed

Lines changed: 34 additions & 8 deletions

File tree

  • Algorithm/Other/leetcode/83. Remove Duplicates from Sorted List/Claude 4.6 extended
  • public/Algorithm/Other/leetcode/83. Remove Duplicates from Sorted List/Claude 4.6 extended

Algorithm/Other/leetcode/83. Remove Duplicates from Sorted List/Claude 4.6 extended/README_React.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
rel="stylesheet"
1515
/>
1616
<link
17-
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css"
17+
href="/vendor/prismjs/themes/prism-tomorrow.min.css"
1818
rel="stylesheet"
1919
/>
2020
<link
@@ -686,20 +686,33 @@ <h3 class="outfit font-bold text-teal-800 text-lg mb-3">アプローチ比較</h
686686
{
687687
step: 5,
688688
title: '異なる値 → current を前進',
689-
desc: 'current.val(1) != nxt.val(2) なので重複なし。current = nxt として current を1つ前進させます。これで current は [2] を指すようになり、次のループに進みます。',
689+
desc: 'current.val(1) != nxt.val(2) なので重複なし。current = nxt として current を1つ前進させます。',
690690
highlight: [1],
691691
nodes: [
692692
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },
693693
{ val: 2, color: '#d1fae5', border: '#10b981' },
694694
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
695695
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
696696
],
697-
note: 'current → [2](重複[1]は除去済み)',
697+
note: 'current → [2]',
698+
},
699+
{
700+
step: 5.5,
701+
title: '次のノードへ',
702+
desc: '再度ループの先頭に戻り、nxt をキャッシュして current.val(2) と nxt.val(3) を比較します。値が異なるので current を [3] に前進させます。',
703+
highlight: [2],
704+
nodes: [
705+
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },
706+
{ val: 2, color: '#f1f5f9', border: '#94a3b8' },
707+
{ val: 3, color: '#d1fae5', border: '#10b981' },
708+
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
709+
],
710+
note: 'current → [3]',
698711
},
699712
{
700713
step: 6,
701714
title: '末尾の重複をスキップ',
702-
desc: 'current.val(3) == nxt.val(3) なので重複。current.next = nxt.next(= None)として最後の重複 [3] をスキップ。current.next が None になったのでループ終了。',
715+
desc: '前ステップから前進した後、current は [3] となります。current.val(3) == nxt.val(3) なので重複。current.next = nxt.next(= None)として最後の重複 [3] をスキップ。current.next が None になったのでループ終了。',
703716
highlight: [2],
704717
nodes: [
705718
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },

public/Algorithm/Other/leetcode/83. Remove Duplicates from Sorted List/Claude 4.6 extended/README_React.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
rel="stylesheet"
1515
/>
1616
<link
17-
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css"
17+
href="/vendor/prismjs/themes/prism-tomorrow.min.css"
1818
rel="stylesheet"
1919
/>
2020
<link
@@ -686,20 +686,33 @@ <h3 class="outfit font-bold text-teal-800 text-lg mb-3">アプローチ比較</h
686686
{
687687
step: 5,
688688
title: '異なる値 → current を前進',
689-
desc: 'current.val(1) != nxt.val(2) なので重複なし。current = nxt として current を1つ前進させます。これで current は [2] を指すようになり、次のループに進みます。',
689+
desc: 'current.val(1) != nxt.val(2) なので重複なし。current = nxt として current を1つ前進させます。',
690690
highlight: [1],
691691
nodes: [
692692
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },
693693
{ val: 2, color: '#d1fae5', border: '#10b981' },
694694
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
695695
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
696696
],
697-
note: 'current → [2](重複[1]は除去済み)',
697+
note: 'current → [2]',
698+
},
699+
{
700+
step: 5.5,
701+
title: '次のノードへ',
702+
desc: '再度ループの先頭に戻り、nxt をキャッシュして current.val(2) と nxt.val(3) を比較します。値が異なるので current を [3] に前進させます。',
703+
highlight: [2],
704+
nodes: [
705+
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },
706+
{ val: 2, color: '#f1f5f9', border: '#94a3b8' },
707+
{ val: 3, color: '#d1fae5', border: '#10b981' },
708+
{ val: 3, color: '#f1f5f9', border: '#94a3b8' },
709+
],
710+
note: 'current → [3]',
698711
},
699712
{
700713
step: 6,
701714
title: '末尾の重複をスキップ',
702-
desc: 'current.val(3) == nxt.val(3) なので重複。current.next = nxt.next(= None)として最後の重複 [3] をスキップ。current.next が None になったのでループ終了。',
715+
desc: '前ステップから前進した後、current は [3] となります。current.val(3) == nxt.val(3) なので重複。current.next = nxt.next(= None)として最後の重複 [3] をスキップ。current.next が None になったのでループ終了。',
703716
highlight: [2],
704717
nodes: [
705718
{ val: 1, color: '#f1f5f9', border: '#94a3b8' },

0 commit comments

Comments
 (0)