slow
and fast
, both pointing to the head of the list.next
pointer of the node before the slow pointer to point to the head of the list, creating the end of the first half.next
pointer of the last node (where the fast pointer stopped) to point to the node after the slow pointer, creating the head of the second half.