simple py solution - beats 100%
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def applyOperations(self, nums: List[int]) -> List[int]:
        zeros = 0
        res = []
        for i in range(len(nums) - 1):
            if nums[i] == nums[i + 1]:
                nums[i] *= 2
                nums[i + 1] = 0
    
        for n in nums:
            if n == 0:
                zeros += 1
            else:
                res.append(n)
                
        return res + ([0] * (zeros))

```
['Python3']