Pointer discipline
Always save next before rewriting links. Dummy nodes simplify edge cases for head insertion/deletion.
Lesson
Pointer surgery — reverse, merge, detect cycles, find middles.
Loading solution…
Always save next before rewriting links. Dummy nodes simplify edge cases for head insertion/deletion.
Cycle detection (Floyd), middle node, and palindrome checks all reuse two speeds on the same list.
Linked List Reverse animates prev/curr/next rewriting the chain.
Showing 24 of the related problems in the 1000-question bank.
Add Two Numbers
Linked List
Remove Nth Node From End of List
Linked List
Merge Two Sorted Lists
Linked List
Merge k Sorted Lists
Heap
Swap Nodes in Pairs
Linked List
Reverse Nodes in k-Group
Linked List
Rotate List
Linked List
Copy List with Random Pointer
Linked List
Linked List Cycle
Two Pointers
Linked List Cycle II
Two Pointers
Reorder List
Linked List
LRU Cache
Design
Sort List
Merge Sort
Intersection of Two Linked Lists
Two Pointers
Reverse Linked List
Linked List
Palindrome Linked List
Linked List
Odd Even Linked List
Linked List
LFU Cache
Design
Middle of the Linked List
Two Pointers
Convert Binary in List to Integer — Practice 20
Linked List
Design Browser History (List) — Practice 22
Linked List
Split Linked List in Parts — Practice 24
Linked List
Plus One Linked List — Practice 26
Linked List
Insertion Sort List — Practice 28
Linked List
Got the lesson?
Mark Linked Lists as understood when the ideas stick.