15% off all plans & roadmaps Use code
See plansLeetCode 143 · Solution & editorial
You are given the head of a singly linked-list. The list can be represented as:
Reorder List is a Linked List Manipulation Patterns problem, in the Reordering / Partitioning subpattern. The pattern covers in-place reversal, merging sorted lists, reordering, and intersection detection
Learn to reorder and partition linked lists. Master techniques like swap pairs, rotate list, and odd-even separation.
The reference solution runs in O(n) time and O(n) space.
Reorder List has been reported in interviews at Facebook, Amazon, Splunk.
The full editorial is part of Pro
It explains the core insight, the complexity analysis and the common mistakes, with a worked solution.
Reorder List is a Linked List Manipulation Patterns problem, in the Reordering / Partitioning subpattern. Once the approach above makes sense, write it yourself and then work through the neighbouring problems that reuse it.