C++| easy to understand | 4 & 1 line code
\nclass Solution {\npublic:\n    int minOperations(int n) {\n         int i = 0, j = n - 1, ans = 0;\n        while(i < j) {\n            ans += j-- - i++;\n   
```\nclass Solution {\npublic:\n    int minOperations(int n) {\n         int i = 0, j = n - 1, ans = 0;\n        while(i < j) {\n            ans += j-- - i++;\n        }\n        return ans;\n    }\n};\n\n```\n\n```\nclass Solution {\npublic:\n    int minOperations(int n) {\n    \n    return n * n / 4;\n    \n    }\n};\n\n```
[]