1. Pointer Manipulation Mechanism
To reverse a singly linked list without allocating new nodes in memory, we maintain three pointers: prev, curr, and next_node.
- Store
curr.nextbefore mutating it to prevent severing the remaining chain. - Redirect
curr.nextbackward to point toprev. - Shift
prevandcurrone step forward.