leetcode - Reverse Linked List @ Sun, Feb 19, 2023 9:27 AM
leetcode - Reverse Linked List @ Sun, Feb 19, 2023 6:08 PM
Expand 12 lines ...
+ Base Case: Rather than a **condition** to keep running, recursive algorithms reach a point to **stop and return**. This point is commonly referred to as the **base case**.
+ Each time you call the function, an argument must change. One argument in particular should be changing *towards* the **base case**.
+ **Establish your base case**. Figure out when the recursion ends! Without a place to stop you’ll wind up overflowing the [call stack](https://en.wikipedia.org/wiki/Call_stack).
* Definition for singly-linked list.
Expand 48 lines ...