283. Move Zeroes
Practice Move Zeroes for free on NudgeCode: Easy, Two Pointers pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
Move all 0s in nums to the end while keeping the other elements in their original order. Modify the array in place; don't return anything.
Example
nums = [0,1,0,3,12] -> [1,3,12,0,0]
Constraints
- 1 <= nums.length <= 10^4