Linked Lists, Sentinel Nodes & Floyd's Cycle Detection
Master node-based pointer data structures: Singly and Doubly Linked Lists, Sentinel Dummy Nodes for bug-free pointer manipulation, and Floyd's Tortoise and Hare algorithm.
Object reference manipulation and memory pointers
Command of singly/doubly linked lists, Floyd's cycle detection, Reverse in K-Group, and O(1) LRU Cache architecture.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 10.01Linked List Architecture: Pointer Manipulation & Sentinel Nodes4 min
Deconstruct linked lists. Understand pointer re-linking, Sentinel (Dummy) nodes for boundary simplification, and reverse a linked list iteratively and recursively.
- 10.02Floyd's Cycle Detection: The Tortoise and the Hare & Cycle Entry4 min
Master cycle detection in node graphs. Prove Floyd's Tortoise and Hare algorithm, locate cycle existence, and mathematically derive the cycle entry node.
- 10.03Pointer Manipulation: Iterative Inversion and Reverse Nodes in K-Group4 min
Master iterative and recursive in-place pointer manipulation: reversing singly linked lists, reversing in k-groups, and checking palindromes with O(1) space.
- 10.04Composite Data Structures: Designing an O(1) LRU Cache with Hash-Doubly-Linked Lists4 min
Engineer an industrial-grade Least Recently Used (LRU) Cache combining a HashMap with a Doubly Linked List to achieve strict O(1) get and put operations.
Ready to move on?
Engineer a production-ready LRU cache combining a HashMap with a Doubly Linked List.
Open the module self-check