[ C++ ] - Runtime : 8 ms - 99.66 % faster || Easy Solution
Code\n\nclass Solution {\npublic:\n    int minOperations(vector<int>& nums) {\n        int sum=0;\n        for(int i=0;i<nums.size()-1;i++){\n            if(num
# Code\n```\nclass Solution {\npublic:\n    int minOperations(vector<int>& nums) {\n        int sum=0;\n        for(int i=0;i<nums.size()-1;i++){\n            if(nums[i]>nums[i+1]||nums[i]==nums[i+1]){\n                sum+=nums[i]-nums[i+1]+1;\n                nums[i+1]+=nums[i]-nums[i+1]+1;\n            }\n        }\n        return sum;\n    }\n};\n```
['Array', 'Greedy', 'C++']