Rust Simple Solution
rust\nimpl Solution {\n    pub fn min_operations(nums: Vec<i32>) -> i32 {\n        let mut count: i32 = 0;\n        let mut prev: i32 = 0;\n        for num in n
```rust\nimpl Solution {\n    pub fn min_operations(nums: Vec<i32>) -> i32 {\n        let mut count: i32 = 0;\n        let mut prev: i32 = 0;\n        for num in nums {\n            if prev >= num {\n                count += (prev + 1) - num;\n                prev += 1\n            } else {\n                prev = num\n            }\n        }\n        count\n    }\n}\n```
['Rust']