Java Easiest Solution
```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int ans = 0;\n        for(int i=0;i<nums.length-1;i++){\n            if(nums[i+1]<=nu
```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int ans = 0;\n        for(int i=0;i<nums.length-1;i++){\n            if(nums[i+1]<=nums[i]){\n                ans += nums[i]-nums[i+1]+1;\n                nums[i+1] = nums[i]+1;\n            }\n        }\n        return ans;\n    }\n}
['Java']