Java solution Using two pointer
Straight forward solution Easy to understand\nMethod 1:\n\nclass Solution {\n    public int minOperations(int n) {\n        int count =0;\n        int[] arr = n
Straight forward solution Easy to understand\nMethod 1:\n```\nclass Solution {\n    public int minOperations(int n) {\n        int count =0;\n        int[] arr = new int[n];\n        for (int i=0; i < n ; i++){\n            arr[i] =(2 * i) +1;\n        }\n        int left =0; \n        int right=n-1;\n        while (left <= right){\n            while (arr[left] != arr[right]){\n             arr[left] += 1;\n             arr[right] -= 1;  \n                count++;\n            }\n            left++;\n            right--;\n        }\n        return count;\n        \n    }\n}\n```\nMethod 2:\n```\nclass Solution {\n    public int minOperations(int n) {\n        return (n*n)/4;\n    }\n}\n```\n\n
['Two Pointers', 'Java']