Linked Lists
Fundamental pointer-based structure. Core to recursion, in-place manipulation, and memory management patterns.
1.0 Basics and Traversal
- Single and Doubly Linked Lists
- Iterative vs Recursive Traversal
- Handling nulls and one-node cases
2.0 Two Pointers (Fast & Slow)
- Cycle detection (Floyd’s algorithm)
- Finding midpoint
- Detecting palindrome in-place
3.0 Reversal Techniques
- Full reversal (iterative and recursive)
- Partial reversal between
mandn - Reverse in groups of K nodes
4.0 Merge and Sort Operations
- Merge two sorted lists
- Merge K sorted lists (using heap)
- Sort linked list (merge sort)
5.0 Deletion and Manipulation
- Delete N-th node from end
- Delete given node (without head)
- Remove duplicates
6.0 Cloning and Deep Copies
- Clone list with random pointer
- HashMap-based vs O(1) interleaving method
7.0 Advanced Structural Problems
- Intersection of two lists
- Detect start of cycle
- Flatten multi-level linked list
- Reorder list (alternate merge)
8.0 Circular and Doubly Linked Lists (Special Cases)
- Circular loop detection and breaking
- DLL insert/delete patterns
- Applications in LRU/Deque
9.0 Design Applications
- LRU Cache (DLL + HashMap)
- Browser history (bi-directional navigation)
- Music/Carousel queue rotation
10.0 Special Mentions
- Floyd’s Cycle Detection
- Recursive reversal variations
- In-place manipulation with pointer gymnastics
- Dummy node patterns
11.0 Math-Based Linked List Operations
- Add two numbers (forward and reverse order)
- Subtract two numbers (handle borrow cases)
- Multiply two numbers (simulating digit-by-digit)
- Convert linked list to number and back
- Edge handling: carry, leading zeros, unequal lengths