5 LINE JAVA SOLUTION || Easy peasy lemon squeezy😊 || SIMPLE
\n\n# Code\n\nclass Solution {\n    public int minOperations(int[] nums) {\n        int minimum_operations = 0;\n        for(int i=1;i<nums.length;i++){\n      
\n\n# Code\n```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int minimum_operations = 0;\n        for(int i=1;i<nums.length;i++){\n            minimum_operations += Math.max(nums[i-1]+1,nums[i]) - nums[i];\n            nums[i] = Math.max(nums[i-1]+1,nums[i]);\n        }\n        return minimum_operations;\n    }\n}\n```
['Java']