Search⌘ K
AI Features

Solution: Reorder List

Solution: Reorder List rearranges a singly linked list by alternating nodes from the front and back, changing only the links between nodes.

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} ...