Python [one pass solution]
\nclass Solution(object):\n    def minOperations(self, nums):\n        res = 0\n        for i in range(1,len(nums)):\n            if nums[i]<=nums[i-1]:\n      
```\nclass Solution(object):\n    def minOperations(self, nums):\n        res = 0\n        for i in range(1,len(nums)):\n            if nums[i]<=nums[i-1]:\n                diff = nums[i-1]-nums[i]+1\n                res += diff\n                nums[i] = nums[i-1]+1\n        return res\n```
[]