Easy C++ Solution | With Explaination
\nclass Solution {\npublic:\nint minOperations(vector<int>& nums) {\n        int count=0;\n\t\t//Loop through the vector starting from the second element\n     
```\nclass Solution {\npublic:\nint minOperations(vector<int>& nums) {\n        int count=0;\n\t\t//Loop through the vector starting from the second element\n        for(int i=1;i<nums.size();i++){\n\t\t    //Check if the current element is less than or equal to the previous one\n            if(nums[i]<=nums[i-1]){\n\t\t\t     //Increment count by the difference between the previous and current elements plus 1\n                count+=nums[i-1]-nums[i]+1;\n\t\t\t\t//Increase the current element by the calculated difference\n                nums[i]+=nums[i-1]-nums[i]+1;\n            }\n        }\n        return count;\n    }\n};\n```
['C']