Linked List
This is a premium interview-preparation course on the data structure that separates people who are comfortable with pointers from people who are not. A **linked list** trades O(1) random access for O(1) splicing — you can insert, delete, and rearrange nodes just by rewiring **next** (and **prev**) references, without shifting anything. The catch is that a single dropped pointer loses the rest of the list, so the whole game is manipulating references in the right order. You will start with the mental models (singly, doubly, and circular lists, the fast and slow pointer, and the dummy-node trick that removes edge cases), then work through curated problems grouped by the patterns interviewers actually test: in-place reversal, cycle detection, k-group and pair reversal, merging and sorting, and advanced pointer-heavy design. Every lesson visualises the pointers, dry-runs a concrete example, then shows a clean Java 17 implementation.
22
Curated lessons
6
Learning modules
6h 58m
Est. study time
9
Target companies
What you'll learn
- Rewire next and prev pointers in the correct order so no node is ever orphaned.
- Apply the fast and slow pointer to find midpoints, detect cycles, and locate cycle entries.
- Use a dummy head to make insertions, deletions, and merges edge-case free.
- Reverse sublists, k-groups, and pairs in place with O(1) extra space.
Your progress
0 / 22
problems completed
22 available now · keep going!
Mark lessons complete as you work through them. Progress is saved on this device and syncs to your account when you sign in.
Learning roadmap
Work top to bottom — each module builds on the last.
- 1
Fundamentals
Rewire references without losing the listThe node mental models — singly, doubly, and circular lists — plus the two techniques every problem leans on: the fast/slow pointer and the dummy node.
5/5 problems37m - 2
Basic Operations
Iterate with prev/curr; splice with a dummy headThe core moves you compose everywhere: reverse a list, find its middle, merge two sorted lists, and delete nodes cleanly.
4/4 problems1h - 3
Fast & Slow Pointer
Two speeds meet inside a cycleFloyd's tortoise-and-hare: detect cycles, find where a cycle begins, and reframe number problems as linked-list cycles.
4/4 problems1h 10m - 4
Reversal Pattern
Reverse a segment, reconnect the boundariesReverse only part of a list: a sublist between two positions, fixed-size k-groups, and adjacent pairs — all in place.
3/3 problems1h 6m - 5
Merge Pattern
Merge with a dummy head; divide and conquerCombine and reorder lists: merge k sorted lists with a heap, sort a list in O(n log n), and partition around a pivot value.
3/3 problems1h 25m - 6
Advanced
Hash map + careful pointer bookkeepingPointer-heavy problems that combine hashing and structure design: deep-copy with random pointers, flatten a multilevel list, and design an LFU cache.
3/3 problems1h 40m
Modules
6 themed modules from fundamentals to advanced.
Fundamentals
The node mental models — singly, doubly, and circular lists — plus the two techniques every problem leans on: the fast/slow pointer and the dummy node.
Basic Operations
The core moves you compose everywhere: reverse a list, find its middle, merge two sorted lists, and delete nodes cleanly.
Fast & Slow Pointer
Floyd's tortoise-and-hare: detect cycles, find where a cycle begins, and reframe number problems as linked-list cycles.
Reversal Pattern
Reverse only part of a list: a sublist between two positions, fixed-size k-groups, and adjacent pairs — all in place.
Merge Pattern
Combine and reorder lists: merge k sorted lists with a heap, sort a list in O(n log n), and partition around a pivot value.
Advanced
Pointer-heavy problems that combine hashing and structure design: deep-copy with random pointers, flatten a multilevel list, and design an LFU cache.
Full curriculum
17 problems and 5 concept lessons in learning order.
- 1Singly Linked ListFundamentals Concept
- 2Doubly Linked ListFundamentals Concept
- 3Circular Linked ListFundamentals Concept
- 4Fast & Slow PointerFundamentals Concept
- 5Dummy Node PatternFundamentals Concept
- 6Reverse Linked ListBasic OperationsEasy
- 7Middle of the Linked ListBasic OperationsEasy
- 8Merge Two Sorted ListsBasic OperationsEasy
- 9Remove Linked List ElementsBasic OperationsEasy
- 10Linked List CycleFast & Slow PointerEasy
- 11Linked List Cycle IIFast & Slow PointerMedium
- 12Happy NumberFast & Slow PointerEasy
- 13Find the Duplicate NumberFast & Slow PointerMedium
- 14Reverse Linked List IIReversal PatternMedium
- 15Reverse Nodes in k-GroupReversal PatternHard
- 16Swap Nodes in PairsReversal PatternMedium
- 17Merge k Sorted ListsMerge PatternHard
- 18Sort ListMerge PatternMedium
- 19Partition ListMerge PatternMedium
- 20Copy List with Random PointerAdvancedMedium
- 21Flatten a Multilevel Doubly Linked ListAdvancedMedium
- 22LFU CacheAdvancedHard