@@ -0,0 +1,712 @@
+import org.junit.Test;%0A%0Aimport static org.junit.Assert.assertArrayEquals;%0A%0A%0A/**%0A * https://leetcode.com/problems/move-zeroes/%0A */%0Apublic class Solution %7B%0A%0A    public void moveZeroes(int%5B%5D nums) %7B%0A        int zeroAt = -1;%0A        for (int i = 0; i %3C nums.length; i++) %7B%0A            if (zeroAt == -1 && nums%5Bi%5D == 0) %7B%0A                zeroAt = i;%0A            %7D%0A            if (nums%5Bi%5D != 0 && zeroAt != -1) %7B%0A                nums%5BzeroAt%5D = nums%5Bi%5D;%0A                nums%5Bi%5D = 0;%0A                zeroAt++;%0A            %7D%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test() %7B%0A        int%5B%5D nums = new int%5B%5D%7B0, 1, 0, 3, 12%7D;%0A        moveZeroes(nums);%0A        assertArrayEquals(new int%5B%5D%7B1, 3, 12, 0, 0%7D, nums);%0A    %7D%0A%0A%0A%7D%0A

Move Zeroes