Java solution 2ms
Intuition\nFor every element, which is less than or equal to its predecessor, perform the required no. of make it strictly increasing\n\n# Approach\nTraverse th
# Intuition\nFor every element, which is less than or equal to its predecessor, perform the required no. of make it strictly increasing\n\n# Approach\nTraverse the array from left to right, for every element, ```if nums[i] <= nums[i-1] ```, then we increment the i-th element and add the required no.of steps to the result.\n\n# Complexity\n- Time complexity:\nO(N)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int ans=0;\n        for(int i=1; i<nums.length; i++){\n            if(nums[i] > nums[i-1]) continue;\n            ans += (nums[i-1]-nums[i]+1);\n            nums[i] = nums[i-1]+1;\n        }\n        return ans;\n    }\n}\n```
['Java']