Pointer Trio
`prev`, `curr`, and `next` protect the chain while each link is reversed.
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Reverse DLL swaps each node's next and prev fields, then moves the head to the old tail.
`prev`, `curr`, and `next` protect the chain while each link is reversed.
The current node points backward to `prev`, then all pointers advance.
When traversal ends, `prev` becomes the new head.
DLL and k-group reversal use the same pointer discipline with extra boundaries.