Problem Description
Given an integer array A, move all 0's to the end of it while maintaining the relative order of the non-zero elements.
Note that you must do this in-place without making a copy of the array.
1 <= |A| <= 105
A = [0, 1, 0, 3, 12]
Input 2:
A = [0]
[1, 3, 12, 0, 0]
Ouput 2:
[0]
Shift all zeroes to the end.
Explanation 2:
There is only one zero so no need of shifting.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.