Given an integer array nums, move all the 0s to the end of the array. The other numbers must stay in the same order as before.
Do it in place. Do not make a copy of the array.
Examples
Example 1:
Input: nums = [0,4,0,5,6]
Output: [4,5,6,0,0]
Explanation: The non-zero numbers 4, 5, 6 keep their order. The zeros go to the end.
Example 2:
Input: nums = [7,8,9]
Output: [7,8,9]
Explanation: There is no zero, so nothing changes.
Example 3:
Input: nums = [0,0,9]
Output: [9,0,0]
Explanation: The 9 moves to the front.