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
Examples
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy