You are given the head of a singly linked-list. The list can be represented as: `L0 → L1 → … → Ln - 1 → Ln`. Reorder the list to be on the following form: `L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …`. You may not modify the values in the list's nodes. Only nodes themselves may be changed.
Linked List Multi-Phase Manipulation
Reordering requires connecting the first node to the last, then to the second, then to the second-to-last, and so on. We can achieve this in $O(n)$ time using three steps: 1. Find the middle of the list. 2. Reverse the second half. 3. Merge the two halves by alternating nodes.