100% Faster and 100% Less Space. Easy Solution in Python
```class Solution:\n    def minOperations(self, nums: List[int]) -> int:\n        base = nums[0]\n        count = 0\n        for i in range(1,len(nums)):\n     
```class Solution:\n    def minOperations(self, nums: List[int]) -> int:\n        base = nums[0]\n        count = 0\n        for i in range(1,len(nums)):\n            if nums[i] < base:\n                x = base - nums[i] + 1\n                count += x\n                nums[i] += x\n                base = nums[i]\n            elif nums[i] > base:\n                base = nums[i]\n            else:\n                nums[i] += 1\n                base = nums[i]\n                count += 1\n        return count
['Python']