This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Given an array numbers, write a java function to move all 0's to the end of | |
it while maintaining the relative order of the non-zero elements. | |
You must do this in-place without making a copy of the array. | |
Minimize the total number of operations. | |
Example: | |
Input: {0,1,0,12,11} | |
Output: {1,12,11,0,0} |