SERIES
Linked List
Teach linked list manipulation — pointer reversal, two-pointer (fast/slow), merge patterns.
In this seriesNEWSLETTER
01
Reverse Linked List: three pointers and why the order matters
Reversing a linked list iteratively requires three pointers: prev, curr, and next. The order you update them isn't arbitrary — do it wrong and you lose the reference to the rest of the list. Getting the order right once means you never have to think about it again.Jun 13, 2026 · 10 min read · #00027
02
Merge Two Sorted Lists: the dummy head trick
Merging two sorted linked lists is the core subroutine inside merge sort. The dummy head node eliminates the special case for the first element — you always have a previous node to append to, which makes the loop uniform from start to finish.Jun 13, 2026 · 10 min read · #00028
03
Reorder List: three operations you already know
Reorder List looks custom, but it decomposes cleanly into three operations you've seen before: find the midpoint (slow/fast pointers), reverse the second half, then merge alternating nodes. Each sub-problem is its own solved problem. The insight is the decomposition.Jun 13, 2026 · 14 min read · #00029
Occasional notes on what I'm building
Get an email when I publish a new post — engineering write-ups, no spam. Unsubscribe anytime.