Skip to main content
mediumBlind 75

Reorder List

Reorder list to L0 → Ln → L1 → Ln-1 → L2 → Ln-2 → ... Example: [1,2,3,4] => [1,4,2,3]

Three moves, no extra list. I find the middle, reverse the back half, then weave the halves node by node.

Linked ListStackTwo Pointers

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.

1Reorder Listmedium
Based onLeetCode