Easy C++ solution
\nclass Solution {\npublic:\n    int minOperations(vector<int>& nums) {\n        int result = 0;\n        for(int i = 1; i<nums.size(); i++){\n            if(nu
```\nclass Solution {\npublic:\n    int minOperations(vector<int>& nums) {\n        int result = 0;\n        for(int i = 1; i<nums.size(); i++){\n            if(nums[i] <= nums[i-1]){       \n                int newNum = nums[i-1] + 1;\n                result += newNum - nums[i];\n                nums[i] = newNum; \n            }\n        }\n        return result;\n    }\n};\n```
[]