"Reversing a linked list is the interview question. Not because it's hard, but because it's impossible to fake: it tests whether pointers and the order you rewire them are real to you, or just words."
The Mental Picture
You have 1 → 2 → 3 → None and you want 3 → 2 → 1 → None. The data doesn't move — only the arrows flip. Walk the list, and at each node, turn its next arrow around to point at the node you just came from. The whole job is "flip each arrow backward, one at a time, without losing the rest of the list while you do it."
The Iterative Way: Three Pointers
The classic solution carries three references as it walks: prev (the node behind you, where this arrow should now point), curr (the node you're flipping), and a saved next (so you don't lose the rest of the list the instant you flip curr.next). At each step: stash curr.next, flip curr.next = prev, then slide all three forward. When curr falls off the end, prev is the new head. O(n) time, O(1) space — you reversed the whole thing with three variables.
The order inside the loop is the entire difficulty, and it's the same rule from the first lesson: save what you're about to overwrite before you overwrite it. Flip curr.next before saving the old next and the rest of the list vanishes into the void.
The Recursive Way: Elegant but Heavier
Recursion can reverse a list in a few lines: reverse the rest of the list, then make the next node point back at the current one. It reads beautifully — but every recursive call sits on the call stack until the base case returns, so it costs O(n) space, and on a very long list it can blow the stack (RecursionError). It's a lovely demonstration of recursive thinking (which the Recursion track explores fully), but in production the iterative O(1)-space version is usually the right call.
Pippa's Confession
curr.next = prev before saving the old next — and watched two-thirds of my list evaporate. Dad didn't give me the answer; he made me draw four boxes and physically erase-and-redraw each arrow in order. Doing it by hand on paper burned the sequence in: save next, flip, advance prev, advance curr. I've never lost a list to wrong-order rewiring since. Some things you have to draw before you can type.