Skip to content
BytePatterns

Linked Lists

Follow the pointers — and learn every trick they hide.

Linked Lists progress0 / 10
  1. Singly Linked List BasicsEach item carries the address of the next one.4m
  2. Traversal and SearchOne node at a time is the only way through.4m
  3. Insert and DeleteRewire two links, and nothing else has to move.5m
  4. Reverse a Linked ListFlip every arrow backwards using three pointers.5m
  5. Fast and Slow PointersOne hop versus two finds the middle in one pass.5m
  6. Detect a CycleIf the list loops, the fast pointer laps the slow one.5m
  7. Find the Cycle StartKnowing a loop exists is half the job — now find its door.6m
  8. Merge Two Sorted ListsZip two ordered chains together without allocating a single node.5m
  9. Copy a List With Random LinksClone the nodes first, wire the pointers second.6m
  10. Doubly Linked ListsAdd a backwards pointer and removal stops needing a search.6m

Quiz yourself: 3 questions from this module

1 / 3

What does a singly linked list node hold?