✅ 🎯 📌 Simple Solution || Pointers || Fastest Solution ✅ 🎯 📌
Code
# Code
```python3 []
class Solution:
    def applyOperations(self, nums: List[int]) -> List[int]:
        for i in range(len(nums)-1):
            if nums[i]==nums[i+1]: nums[i],nums[i+1]=nums[i]*2,0
        z=0
        for i in range(len(nums)):
            if nums[i]==0: z+=1
            else: nums[i-z]=nums[i]
        for i in range(z): nums[len(nums)-1-i]=0
        return nums
```
['Array', 'Two Pointers', 'Simulation', 'Python3']