BEGINNER FRIENDLY || EASY TO UNDERSTAND [JAVA]
\nclass Solution {\n    public int minOperations(int[] nums) {\n        int count=0;\n        \n       for(int i=1;i<nums.length;i++) {\n           if(nums[i]<=
```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int count=0;\n        \n       for(int i=1;i<nums.length;i++) {\n           if(nums[i]<=nums[i-1]){\n               count+=nums[i-1]-nums[i]+1;\n               nums[i]+=nums[i-1]-nums[i]+1;\n           }\n           \n       }\n        return count;\n    }\n}\n```
[]