Given an integer array nums, move all 0 values to the end of the array while preserving the relative order of the non-zero elements. Modify the array in place and return the resulting array.
Constraints
1 <= nums.length <= 10^5
-2^31 <= nums[i] <= 2^31 - 1
The relative order of non-zero elements must be preserved
Modify the array in place
Function Signature
defmove_zeroes(nums):
Interviewer
Whenever you're ready, walk me through your approach or go straight to the code. The requirements are in the Question tab.