✅c++|| Simple solution|| Move Zeroes problem extension || O(1) space
The idea is super simple go through all n - 1 elements and see if condition satisifies\nthen the problem is move all zeroes to end \nwe solve it using two point
The idea is super simple go through all n - 1 elements and see if condition satisifies\nthen the problem is move all zeroes to end \nwe solve it using two pointers \n\nLink to move zeroes to end problem :- <b>[Move Zeroes Problem](https://leetcode.com/problems/move-zeroes/)</b>\n\n```c++\nclass Solution {\npublic:\n    vector<int> applyOperations(vector<int>& nums) {\n        int n = nums.size();\n\t\t// checking for the n- 1 conditions \n        for(int i = 0; i < n - 1 ; i++){\n            if(nums[i] == nums[i+1]){\n                nums[i] *= 2;\n                nums[i+1] = 0;\n            }\n        }\n\t\t// using two pointers to push numbers to end\n        int sp = 0;\n        for(int i = 0 ; i < n ; i++){\n            if(nums[i]){\n                swap(nums[i] , nums[sp++]);\n            }\n        }\n        return nums;\n    }\n};\n```
['C']