[Java] - Simple One Pass Solution
Check if the next number (nums[i]), is smaller than current number (nums[i - 1]). If it is smaller, get the difference between current number nums[i - 1] and ne
* Check if the next number (```nums[i]```), is smaller than current number (```nums[i - 1]```). If it is smaller, get the difference between current number ```nums[i - 1]``` and next number ```nums[i]``` and add a 1 to it to make the next number strictly higher than current number.\n* Add the computed difference value to ```minOperations```.\n* Modify the next number (```nums[i]```) by adding the ```difference``` found.\n```\npublic int minOperations(int[] nums) {\n\tint minOperations = 0;\n    for(int i = 1; i < nums.length; i++) {\n\t\tif(nums[i] > nums[i - 1])\n\t\t\tcontinue;\n\t\tint difference = nums[i - 1] - nums[i] + 1; \n        minOperations += difference;\n        nums[i] += difference;\n    }\n    return minOperations;\n}\n```\n**Analysis:**\nTime Complexity: O(n) where n = nums.length.\nSpace Complexity: O(1)\n\t
[]