PATTERN 5: Linked List Thinking (Pointer Manipulation Mastery)
D
Qubits of DPK
April 11, 2026
Core DSA
This should sit between:
Pattern 4 (Two Pointers)
and
Pattern 6 (Sorting & Ordering)
Because Linked List builds on:
- Traversal
- Two pointers
- Pointer control
- Edge case awareness
Core Idea (lock this)
“You don’t have indices. You only have pointers.”
Linked List problems are about:
- Rewiring connections
- Controlling next pointers
- Avoiding null pointer mistakes
If arrays are about indexing,
Linked Lists are about reference control.
How to Recognize This Pattern
Think Linked List when:
- Problem explicitly uses nodes
- You must:
- You hear:
Trigger words:
- “cycle”
- “reverse”
- “middle”
- “merge”
- “reorder”
30 MUST-DO INTERVIEW PROBLEMS
EASY (Pointer Control Basics)
- #Reverse Linked List — LC 206
- #Middle of Linked List — LC 876
- #Linked List Cycle — LC 141
- #Merge Two Sorted Lists — LC 21
- #Remove Linked List Elements — LC 203
- #Delete Node in Linked List — LC 237
- #Palindrome Linked List — LC 234
- #Remove Duplicates from Sorted List — LC 83
- #Intersection of Two Linked Lists — LC 160
- #Convert Binary Number in Linked List to Integer — LC 1290
After these:
You must be comfortable with:
- Slow–fast pointers
- Dummy node technique
- Pointer rewiring
️ MEDIUM (Structural Manipulation)
- #Reverse Linked List II — LC 92
- #Reorder List — LC 143
- #Swap Nodes in Pairs — LC 24
- #Rotate List — LC 61
- #Remove Nth Node From End — LC 19
- #Add Two Numbers — LC 2
- #Add Two Numbers II — LC 445
- #Odd Even Linked List — LC 328
- #Partition List — LC 86
- #Maximum Twin Sum of Linked List — LC 2130
This section tests:
- Controlled pointer rewiring
- Multi-step logic
- Dummy nodes
- Edge cases
HARD (Pointer Engineering)
- #Reverse Nodes in k-Group — LC 25
- #Merge k Sorted Lists — LC 23
- #Sort List — LC 148
- #Flatten a Multilevel Doubly Linked List — LC 430
- #Design Skiplist — LC 1206
- #Remove Zero Sum Consecutive Nodes — LC 1171
- #Reverse Nodes in Even Length Groups — LC 2074
- #Linked List Cycle II — LC 142
- #Insert into Sorted Circular Linked List — LC 708
- #Split Linked List in Parts — LC 725
Now you're in pointer surgery territory.
Why Linked List Must Be Separate
Because Linked List teaches:
- Edge case discipline
- Null safety
- Pointer confidence
- Dummy node trick (interview gold)
Many strong coders fail interviews due to pointer bugs.
This pattern prevents that.
INTERVIEW REVISION CARD — Pattern 5
1️⃣ Pattern in One Line
"Rewire next pointers in-place — you don't have indices, only references."
2️⃣ Recognize It When...
- Input is explicitly a linked list
- Problem says "in-place", "O(1) space", "constant memory"
- Trigger words: "reverse", "cycle", "middle", "merge", "reorder"
- Must avoid using extra arrays
3️⃣ Don't Confuse With...
- Two Pointers (P4) → arrays use indices; linked lists use node references
- Tree Recursion (P11) → trees have two children; linked lists are linear
- Hashing (P2) → cycle detection can use hash but Floyd's is O(1) space
4️⃣ Approach in 3 Steps
- #Always draw the pointer rewiring on paper first
- #Use dummy node to handle edge cases at head
- #Save next pointer BEFORE rewiring — never lose your reference
5️⃣ Invariant to Maintain
"At every step, I have not lost any node reference — prev, curr, next are all accounted for."
6️⃣ Complexity to Justify
- Time: O(N) — single pass for most problems
- Space: O(1) — in-place pointer manipulation
- Why: No auxiliary array, just pointer rewiring
7️⃣ Edge Cases to Always Check
- Null head (empty list)
- Single node list
- Two node list
- Cycle present when not expected
- Even vs odd length list
8️⃣ One Line to Say in Interview
"I'll manipulate pointers in-place using a dummy node to handle edge cases, achieving O(N) time and O(1) space."