simplest java sol
\n\n# Code\n\nclass Solution {\n    public int minOperations(int[] nums) {\n        int[] arr = new int[nums.length];\n        int count =0;\n        for(int i 
\n\n# Code\n```\nclass Solution {\n    public int minOperations(int[] nums) {\n        int[] arr = new int[nums.length];\n        int count =0;\n        for(int i = 0 ; i<nums.length ; i++){\n            arr[i] = nums[i];\n        }\n        for(int i =0 ; i<arr.length-1 ; i++){\n            if(arr[i+1] <=arr[i]){\n                arr[i+1] = arr[i]+1;\n            }\n        }\n        for(int i =0 ; i< arr.length ; i++){\n            count = count + arr[i]-nums[i];\n        }\n        return count;\n    }\n}\n```
['Java']