Linked Lists

No indexes, only arrows. Most linked list bugs are one assignment made too early.

5 lessons · ~50 min

By the end you can

Lessons

  1. 1Follow the arrows8 minWhat a node is, walking a list, and why the front is free while the middle costs a walk.
  2. 2Reversing in place11 minprev, curr and nxt: the three-pointer reversal, the one line order that works, and reversing only the front.
  3. 3A dummy head and two lists11 minA throwaway node that deletes the head-is-special branch, and merging two sorted lists by splicing.
  4. 4Two runners on one list11 minA fixed gap finds the nth node from the end, fast and slow find the middle, and both feed the palindrome check.
  5. 5Spotting linked list problems9 minRewiring, head-may-change and position cues, the cut-the-tail trap, and when a list is the wrong picture.

Practice it after

Real interview questions that test this pattern, in an editor with execution and AI feedback.