All Problems

Reorder List

Mediumlinked-listExpected: O(n) time, O(1) spaceInterview Context
linked-list

Problem

Given a singly linked list L0→L1→...→Ln, reorder it to L0→Ln→L1→Ln-1→... in-place.

Loading...