Simple JAVA Sol || Easy to Understand || 2 approaches with and without space
```\nclass Solution {\n// With Space ================\n    public int minOperations(int n) {\n        int[] arr = new int[n];\n        int sum = 0;\n        for
```\nclass Solution {\n// With Space ================\n    public int minOperations(int n) {\n        int[] arr = new int[n];\n        int sum = 0;\n        for(int i = 0; i < n; i++){\n            arr[i] = (2 * i) + 1;\n            sum += arr[i];\n        }\n        sum = sum / n;\n        int ans = 0;\n        for(int i = 0; i < n/2; i++){\n            ans += (sum - arr[i]);\n        }\n        return ans;\n    }\n\t// Without Space =============\n\t//here with just simple observation in above approach, u can eleminate the space\n\tpublic int minOperations(int n) {\n        int ans = 0;\n        for(int i = 0; i < n/2; i++){\n            ans += (n - ((2*i)+1));\n        }\n        return ans;\n    }\n}\n
['Math', 'Java']