simple solution
``` java solution\n\nclass Solution {\n    public int minOperations(int n) {\n        int[] arr = new int[n];\n        int sumOfNum = 0;\n        for(int i=0;i0
``` java solution\n\nclass Solution {\n    public int minOperations(int n) {\n        int[] arr = new int[n];\n        int sumOfNum = 0;\n        for(int i=0;i<n;i++)\n        { \n            arr[i] = 2*i + 1;\n            sumOfNum += arr[i];\n        }\n        \n        int avg = sumOfNum/n;\n        int count = 0;\n        for(int i=0;i<n;i++)\n        {\n            if((avg-arr[i])>0)\n                count += (avg-arr[i]);\n            else\n                break;\n        }\n        return count;\n    }\n}\n\npython solution\n\nclass Solution(object):\n    def minOperations(self, n):\n        arr = []\n        NumSum = 0;\n        \n        for i in range(0, n, 1):\n            arr.append(2*i + 1)\n            NumSum += arr[i]\n        \n        avg = NumSum/n\n        \n        count = 0;\n        \n        for i in range(0, n, 1):\n            if (avg-arr[i]) > 0:\n                count += (avg-arr[i])\n            else:\n                break\n        \n        return count\n        \n
[]