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…
More Meta interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Dot Product with Run-Length Encoded Vectors
- Count Lakes Wrapped by a Given Island
- Minimum Remove to Make Valid Parentheses
- LLM with Beam Search and Nucleus Sampling (Meta MSL)