easy python solution
\nclass Solution:\n    def minOperations(self, nums: List[int]) -> int:\n        ans=0\n        for i in range(1,len(nums)):\n            ans+=(max(0,nums[i-1]+
```\nclass Solution:\n    def minOperations(self, nums: List[int]) -> int:\n        ans=0\n        for i in range(1,len(nums)):\n            ans+=(max(0,nums[i-1]+1-nums[i]))\n            nums[i]=max(nums[i],nums[i-1]+1)\n        return ans\n```
[]