Wiggle Sort

Asked at Meta · Coding Questions · Difficulty: Medium

Given an integer array `nums`, order the array such that `nums[0] <= nums[1] >= nums[2] <= nums[3] ...` and so on. Implement this function and return the modified array.

Loading the problem…