πLinked Lists from Scratch
Stop memorizing linked-list operations as recipes. Build the pointer intuition that lets you draw any node-and-arrow problem on a whiteboard and solve five classic interview questions without losing your place mid-traversal.
Phase 1Why Linked Lists Trade Layout for Flexibility
See why linked lists trade memory layout for pointer flexibility
A linked list is a treasure hunt, not a row of lockers
6 minA linked list is a treasure hunt, not a row of lockers
A node is a value with a forwarding address
5 minA node is a value with a forwarding address
Walking the chain is the only way to see what's there
6 minWalking the chain is the only way to see what's there
Every operation must leave the chain unbroken
7 minEvery operation must leave the chain unbroken
Phase 2Coding Insert, Delete, and Reverse Without Breaking Pointers
Code insert, delete, and reverse without breaking pointers
Inserting at the front is two pointer moves and a coffee
5 minInserting at the front is two pointer moves and a coffee
To insert in the middle, walk to the node before
7 minTo insert in the middle, walk to the node before
Delete is just rerouting around the dead node
7 minDelete is just rerouting around the dead node
Reverse a list with three pointers and one loop
8 minReverse a list with three pointers and one loop
A dummy head removes every special case
6 minA dummy head removes every special case
Phase 3Singly, Doubly, and Circular β Choose by Problem Shape
Pick singly, doubly, or circular by problem shape
Two pointers per node, twice the freedom of movement
6 minTwo pointers per node, twice the freedom of movement
When the tail points back to the head, the list has no end
6 minWhen the tail points back to the head, the list has no end
Pick the linked-list variant by reading the problem out loud
6 minPick the linked-list variant by reading the problem out loud
Two pointers, different speeds β that's how you catch a cycle
7 minTwo pointers, different speeds β that's how you catch a cycle
Phase 4Solve Five Classic Linked-List Interview Problems by Hand
Solve five classic linked-list interview problems by hand
Walk through five classic linked-list problems on paper
22 minWalk through five classic linked-list problems on paper
Frequently asked questions
- What's the difference between an array and a linked list?
- This is covered in the βLinked Lists from Scratchβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- Why do linked lists make insertion fast but lookup slow?
- This is covered in the βLinked Lists from Scratchβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- How do I reverse a linked list in place without losing pointers?
- This is covered in the βLinked Lists from Scratchβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- When should I use a doubly linked list instead of a singly linked list?
- This is covered in the βLinked Lists from Scratchβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- How does Floyd's tortoise and hare detect a cycle in a linked list?
- This is covered in the βLinked Lists from Scratchβ learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Related paths
πPython Decorators Introduction
Build one mental model for Python decorators that covers closures, argument passing, functools.wraps, and stacking β then ship a working caching or logging decorator from scratch in under 30 lines.
π¦Rust Lifetimes Explained
Stop reading `'a` as line noise and start reading it as scope arithmetic β one failing snippet at a time β until you can thread lifetimes through a small parser or iterator adapter without fighting the borrow checker.
βΈοΈKubernetes Core Concepts
Stop drowning in 30+ resource types. Build the mental model one primitive at a time -- pods, deployments, services, ingress, config -- then deploy a real app with rolling updates and health checks.
πBig O Intuition
Stop treating Big O as math you memorized for an interview β build the intuition to spot O(nΒ²) disasters, pick the right data structure without thinking, and rewrite a slow function from O(nΒ²) to O(n) in under five minutes.