Python || Easy || 98.81% Faster || O(N) Solution
\nclass Solution:\n    def applyOperations(self, nums: List[int]) -> List[int]:\n        for i in range(1,len(nums)):\n            if nums[i-1]==nums[i]:\n     
```\nclass Solution:\n    def applyOperations(self, nums: List[int]) -> List[int]:\n        for i in range(1,len(nums)):\n            if nums[i-1]==nums[i]:\n                nums[i-1]*=2\n                nums[i]=0\n        c,a=0,[]\n        for i in nums:\n            if i==0:\n                c+=1\n                continue\n            a.append(i)\n        return a+[0]*c\n```\n\n**Please upvote if you like the solution**
['Python']