O(1) Solution Cpp explain
if n==6\n[1,3,5,7,9,11]\nsum => 5(6-1) + 3(6-3) + 1(6-5)\n1+3+5 = > 2+4+6 - 1+1+1 => 2(1+2+3) -3 => k=n/2 => 2(k(k+1))/2 - k=> k(k+1) -k=> k^2+k-k=>k^2\nn%2==0 
if n==6\n[1,3,5,7,9,11]\nsum => 5(6-1) + 3(6-3) + 1(6-5)\n1+3+5 = > 2+4+6 - 1+1+1 => 2*(1+2+3) -3 => k=n/2 => 2*(k*(k+1))/2 - k=> k*(k+1) -k=> k^2+k-k=>k^2\nn%2==0 sum of first n/2 odd number\n\nn%2==1 sum of first n/2 even number\nn==7\nsum => 2+4+6 => 2*(1+2+3) => k=n/2 => 2*(k*(k+1))/2=> k*(k+1)\n\n\n```\nclass Solution {\npublic:\n    int minOperations(int n) {\n        if(n%2==1){\n            return (n/2)*(n/2 +1);\n        }\n        else\n        {\n            return (n/2)*(n/2);\n        }\n        \n    }\n};\n```
['Math', 'C', 'C++']