Pattern
Pattern
Pattern
Manipulate pointers carefully with dummy nodes, fast/slow runners, and reversal.
Use dummy nodes for edits and fast/slow pointers for distance.
prev = None
current = head
while current:
next_node = current.next
current.next = prev
prev = current
current = next_node
head = prev