Given a list L0→L1→...→Ln−1→Ln, reorder it to L0→Ln→L1→Ln−1→L2→Ln−2→... Example: 1→2→3→4 becomes 1→4→2→3. This problem combines three techniques you've learned:
1. Find the middle of the list
2. Reverse the second half
3. Merge the two halves alternately It's a great test of whether you can combine basic building blocks. Constraints: up to 5⋅104 nodes, values from 1 to 1000.