2 Solution (0ms one line solution) Java
sum of odd integers in n^2, thus average is (nxn/n)=n\n\nwe iterate over the number of integers less than average and add the difference to answer, since only a
sum of odd integers in n^2, thus average is (nxn/n)=n\n\nwe iterate over the number of integers less than average and add the difference to answer, since only adding 1\nor subtracting 1 is allowed.\n\n```\n\nclass Solution {\n    public int minOperations(int n) {\n        \n        int ans=0;\n        \n        for(int i=0;i<n/2;i++){\n            \n            ans+=n-(2*i)-1;\n            \n        }\n        \n        return ans;\n        \n        \n    }\n}\n\n\n```\n\n\non the basis of observation it is clear that \n\n```\n\nclass Solution {\n    public int minOperations(int n) {\n        \n        return (n*n/4);\n    }\n}\n\n```
['Java']