Java Easy Solution
\n# Code\n\nclass Solution {\n    public int[] moveZeroes(int[] nums) {\n        if(nums.length == 0 || nums == null) return nums;\n        int j = 0;\n        
\n# Code\n```\nclass Solution {\n    public int[] moveZeroes(int[] nums) {\n        if(nums.length == 0 || nums == null) return nums;\n        int j = 0;\n        for (int i : nums){\n            if(i!=0) nums[j++] = i;\n        }\n        while (j< nums.length){\n            nums[j++] = 0;\n        }\n        return nums;\n    }\n    public int[] applyOperations(int[] nums) {\n        ArrayList<Integer> list = new ArrayList<>();\n        for (int i = 0; i < nums.length - 1; i++) {\n            if(nums[i] == nums[i+1]){\n                nums[i] = nums[i]*2;\n                nums[i+1] = 0;\n            }\n        }\n        return moveZeroes(nums);\n    }\n}\n```
['Java']