[ Java ] Beats 100% Very simple to understand solution with explanation
Concept : Since we want a purely increasing array, an element at a[i] if smaller or equal to a[i-1] has to be made at least a[i-1]+1 in order to satisfy our req
__Concept__ : Since we want a purely increasing array, an element at __a[i]__ if smaller or equal to __a[i-1]__ has to be made at least __a[i-1]+1__ in order to satisfy our requirements.\n\n__Steps__ : \n1. check __if a[i] <= a[i-1]__. This is the only case where we need to make an operations.\n2. If we find a[i] <= a[i-1] we will increment a[i] precisely by __(a[i-1] - a[i] + 1)__ in order to make strictly increasing.\n3. Continue doing so till the end of the array keep track of the __count__\n4. Note : All previous __increments__ will automatically propagate throughout the array as we proceed.\n\n__Code__ : \n```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int count = 0;\n        int n = nums.length;\n        for(int i=1;i<n;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        return count;\n    }\n}\n```\n__If you like this solution, please upvote.\nPlease comment for clarifications/doubts.__
['Java']