You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/1-1000/160-intersection-of-two-linked-lists.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ You must first calculate how many kilometers her home is farther from the school
66
66
3. At this time, repeat`node = node.next` on the two linked lists until the same node is found or one of the linked lists has reached the end.
67
67
</p></details>
68
68
69
-
##Step byStepSolutions
69
+
##Step-by-StepSolution
70
70
71
71
1. First calculate the number of nodes in the two linked lists A and B. The number of nodes in linked list A is`node_count_a`, and the number of nodes in linked list B is`node_count_b`.
Copy file name to clipboardExpand all lines: en/1-1000/206-reverse-linked-list.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Given the `head` of a singly linked list, reverse the list, and return _the reve
45
45
46
46
<details><summary>Click to view the answer</summary><p>It is `while (current != null)`, because the operation to be performed is `current.next = previous`.</p></details>
Copy file name to clipboardExpand all lines: en/1-1000/209-minimum-size-subarray-sum.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Given an array of positive integers `nums` and a positive integer `target`, retu
45
45
46
46
For**subarray** problems, you can consider using**Sliding Window Technique**, which is similar to the**Fast & Slow Pointers Approach**.
47
47
48
-
##Step byStepSolutions
48
+
##Step-by-StepSolution
49
49
50
50
1. Iterate over the`nums` array, the`index` of the element is named`fastIndex`. Although inconspicuous, this is the most important logic of the*Fast & Slow Pointers Approach*. Please memorize it.
Copy file name to clipboardExpand all lines: en/1-1000/238-product-of-array-except-self.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ You must write an algorithm that runs in `O(n)` time and **without using the div
68
68
-**High-frequency computation problems**: Such as Fibonacci sequences, factorials, prime number tables, etc., which avoid repetitive calculations by pre-generating lookup tables.
69
69
-**Dynamic Programming (DP)**: Pre-computing and storing solutions to sub-problems, e.g., the`knapsack problem` or`shortest path problems`.
70
70
71
-
##Step byStepSolutions
71
+
##Step-by-StepSolution
72
72
73
73
1.**Initialize Arrays**:
74
74
- Create a`leftProducts` array to store the product of all elements to the left of each element
Copy file name to clipboardExpand all lines: en/1-1000/24-swap-nodes-in-pairs.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Before solving this problem, it is recommended to solve the simple problem [206.
46
46
1. To solve this problem, you still need to define at least two variables:`current` and`previous`.
47
47
2. The loop condition should be`while (current.next != null)` instead of`while (current != null)`, because the operations that need to be performed include`current.next.next`.