Back to Question
Wiggle Sort II
Question Explain
Given an unsorted array `nums`, reorder it such that $nums[0] < nums[1] > nums[2] < nums[3] \dots$. Must be solved in $O(n)$ time with $O(1)$ extra space.
Start Trying This Question Simulation
Click "Start Speaking" and answer the question naturally.