Solution which beats 96% in C#
\npublic class Solution {\n    public int MinOperations(int[] nums) {\n          int currElement = nums[0], count = 0;\n            for (int i = 1; i < nums.Len
```\npublic class Solution {\n    public int MinOperations(int[] nums) {\n          int currElement = nums[0], count = 0;\n            for (int i = 1; i < nums.Length; i++)\n            {\n                if (currElement < nums[i])\n                {\n                    currElement = nums[i];\n                }\n                else\n                {\n                    count += currElement - nums[i] + 1;\n                    currElement++;\n                }\n            }\n            return count;\n    }\n}\n```
['C#']