You are given an integer array nums.
Your task is to move all zeroes in the array to the end, while maintaining the relative order of all non-zero elements.
You must perform this operation in-place, meaning you cannot create a copy of the array.
Input: nums = [4, 0, 5, 0, 3, 12]
Output: [4, 5, 3, 12, 0, 0]
Input: nums = [1, 2, 0, 0, 5, 6]
Output: [1, 2, 5, 6, 0, 0]
Accepted:
Submission: