Least You Need to Know: Reversing a Linked List with Prev, Current, and Next
Otevřít lekci
Linked-list reversal is the interview archetype for pointer discipline: keep track of what was before, what you are on, and what comes next. The core invariant is that one prefix has already been reversed while the remaining suffix is still untouched.