LeetCode #day4 #java

    LeetCode[day4] - Move zeros

    Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note: 1. You must do this in-place without making a copy of the array.Minimize the total number of operations. 2. Minimize the total number of operations. Example: Input: [0,1,0,3,12] Output: [1,3,12,0,0] 1. 알고리즘을 해결하기 위해서 생각한 방법 - 문제의 조건에서는 별도의 다른 array 공간을 만들면 안..