Skip to content

Commit 39d1e45

Browse files
committed
fix(math): update Mermaid flowchart Compare node labels and CheckEmpty error branch in Palindrome Number and Roman to Integer
1 parent e5ede53 commit 39d1e45

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

Mathematics/Palindrome/leetcode/9. Palindrome Number/claud sonnet 5/README_react.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@
610610
' Loop -- はい --> Extract[最下位桁をrevertedHalfへ追加する]',
611611
' Extract --> Shrink[originalの最下位桁を切り捨てる]',
612612
' Shrink --> Loop',
613-
' Loop -- いいえ --> Compare{original == revertedHalf または x == rev // 10 か}',
613+
' Loop -- いいえ --> Compare{originalとrevertedHalfが一致するか}',
614614
' Compare -- はい --> RetTrue[trueを返す]',
615615
' Compare -- いいえ --> RetFalse3[falseを返す]',
616616
' classDef startEnd fill:#d1fae5,stroke:#10b981,stroke-width:2px,color:#065f46;',

Mathematics/Roman numerals/leetcode/13. Roman to Integer/sonnet 5/README_react.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ <h1 class="outfit text-[2.4rem] font-extrabold text-teal-900 mb-1">
11441144
' Start[処理開始 romanToInt呼び出し]',
11451145
' Start --> Validate[入力の型と長さを検証]',
11461146
' Validate --> CheckEmpty{文字列は空か}',
1147-
' CheckEmpty -- Yes --> RetZero[0を返す]',
1147+
' CheckEmpty -- Yes --> ErrEmpty[ValueError: Input cannot be empty]',
11481148
' CheckEmpty -- No --> InitTotal[totalを0で初期化]',
11491149
' InitTotal --> LoopCheck{未処理の文字が残っているか}',
11501150
' LoopCheck -- No --> RetTotal[totalを返す]',
@@ -1159,7 +1159,9 @@ <h1 class="outfit text-[2.4rem] font-extrabold text-teal-900 mb-1">
11591159
' classDef startEnd fill:#d1fae5,stroke:#10b981,stroke-width:2px,color:#065f46;',
11601160
' classDef decision fill:#fef3c7,stroke:#f59e0b,stroke-width:2px,color:#92400e;',
11611161
' classDef process fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0c4a6e;',
1162-
' class Start,RetZero,RetTotal startEnd',
1162+
' classDef errNode fill:#fee2e2,stroke:#dc2626,stroke-width:2px,color:#991b1b;',
1163+
' class Start,RetTotal startEnd',
1164+
' class ErrEmpty errNode',
11631165
' class CheckEmpty,LoopCheck,Compare decision',
11641166
' class Validate,InitTotal,GetCurrent,GetNext,Subtract,Add,Advance process',
11651167
' linkStyle 2 stroke:#059669,stroke-width:2px',

public/Mathematics/Palindrome/leetcode/9. Palindrome Number/claud sonnet 5/README_react.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@
610610
' Loop -- はい --> Extract[最下位桁をrevertedHalfへ追加する]',
611611
' Extract --> Shrink[originalの最下位桁を切り捨てる]',
612612
' Shrink --> Loop',
613-
' Loop -- いいえ --> Compare{original == revertedHalf または x == rev // 10 か}',
613+
' Loop -- いいえ --> Compare{originalとrevertedHalfが一致するか}',
614614
' Compare -- はい --> RetTrue[trueを返す]',
615615
' Compare -- いいえ --> RetFalse3[falseを返す]',
616616
' classDef startEnd fill:#d1fae5,stroke:#10b981,stroke-width:2px,color:#065f46;',

public/Mathematics/Roman numerals/leetcode/13. Roman to Integer/sonnet 5/README_react.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ <h1 class="outfit text-[2.4rem] font-extrabold text-teal-900 mb-1">
11441144
' Start[処理開始 romanToInt呼び出し]',
11451145
' Start --> Validate[入力の型と長さを検証]',
11461146
' Validate --> CheckEmpty{文字列は空か}',
1147-
' CheckEmpty -- Yes --> RetZero[0を返す]',
1147+
' CheckEmpty -- Yes --> ErrEmpty[ValueError: Input cannot be empty]',
11481148
' CheckEmpty -- No --> InitTotal[totalを0で初期化]',
11491149
' InitTotal --> LoopCheck{未処理の文字が残っているか}',
11501150
' LoopCheck -- No --> RetTotal[totalを返す]',
@@ -1159,7 +1159,9 @@ <h1 class="outfit text-[2.4rem] font-extrabold text-teal-900 mb-1">
11591159
' classDef startEnd fill:#d1fae5,stroke:#10b981,stroke-width:2px,color:#065f46;',
11601160
' classDef decision fill:#fef3c7,stroke:#f59e0b,stroke-width:2px,color:#92400e;',
11611161
' classDef process fill:#e0f2fe,stroke:#0284c7,stroke-width:2px,color:#0c4a6e;',
1162-
' class Start,RetZero,RetTotal startEnd',
1162+
' classDef errNode fill:#fee2e2,stroke:#dc2626,stroke-width:2px,color:#991b1b;',
1163+
' class Start,RetTotal startEnd',
1164+
' class ErrEmpty errNode',
11631165
' class CheckEmpty,LoopCheck,Compare decision',
11641166
' class Validate,InitTotal,GetCurrent,GetNext,Subtract,Add,Advance process',
11651167
' linkStyle 2 stroke:#059669,stroke-width:2px',

0 commit comments

Comments
 (0)