Linked List
First contact with chained structures and pointer manipulation.
Lessons
- ✓01
Recognizing linked list problems
What a linked list is, the ListNode node, and why pointers change the way you think.
- ✓02
Pattern 1: Dummy node and two pointers
The sentinel node that simplifies edge cases and the trick of the fixed gap between pointers.
- ✓03
Pattern 2: In-place reversal
Reversing a list's pointers with three variables and O(1) space.
- ✓04
Pattern 3: Slow and fast pointers
Two pointers at different speeds: the middle of the list and cycle detection (Floyd).
- ✓05
Pattern 4: Merging sorted lists
Stitching two sorted lists into one, guided by a dummy node.
- ✓06
Pattern 5: Combining the patterns
Hard problems (like reordering the list) that fit together middle + reversal + merge.
- ✓07
Synthesis: which pattern to use?
The Linked List section's decision tree and the general quiz before the final exam.
1 easy + 1 medium + 1 hard — unseen problems
With hidden test cases, just like the real LeetCode. This is where you confirm you can leave the section solving any problem of the topic.