Solution: Reorder List

Let's solve the Reorder List problem using the In-Place Manipulation of a Linked List pattern.

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:

L0L_{0}L1L_{1}L2L_{2} → … → Ln2L_{n-2}Ln1L_{n-1} ...