Reorder List
Try to solve the Reorder List problem.
We'll cover the following
Statement
Given the head of a singly linked list, reorder the list as if it were folded on itself. For example, if the list is represented as follows:
→ → → … → → → ​
This is how you’ll reorder it:
→ → → → → → …
You don’t need to modify the values in the list’s nodes; only the links between nodes need to be changed.
Constraints:
- The range of number of nodes in the list is .
-
Node.value