Problems/

How Reversing a Linked List Works

medium

Concept check — write, then compare

Explain, step by step, how to reverse a singly linked list in place (the iterative three-pointer technique).

Your answer should cover:

  1. Which pointers you maintain and what each one means.
  2. The exact sequence of pointer updates in one loop iteration, and why the order of those updates matters.
  3. A short walkthrough on the list 1 → 2 → 3.
  4. The time and space complexity, and why the recursive version differs in space.

You can write pseudocode or real code to support the explanation, but the why is the marked part.

Explaining out loud is the test — write as if teaching someone.