Java | Array | Easy Approach
\nclass Solution {\n    public int minOperations(int[] nums) {\n        int count=0;\n        for(int i=1;i<nums.length;i++){\n            if(nums[i]<=nums[i-1]
```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int count=0;\n        for(int i=1;i<nums.length;i++){\n            if(nums[i]<=nums[i-1]){\n                count=count+nums[i-1]-nums[i]+1;\n                nums[i]=nums[i-1]+1;\n            }\n        }\n        return count;\n    }\n}\n```\nKindly upvote if you like the code.
['Array', 'Java']