Reorder List
Medium · Linked Lists · about 25 minutes
Asked at Meta, Amazon, Microsoft, Bloomberg.
Write the list's nodes as L0 → L1 → … → Ln. Rearrange them in place so the order alternates between the front and the back: L0, Ln, L1, Ln-1, L2, Ln-2, … Move the nodes themselves (don't just copy values) and return the head.