Linear Time Solution O( limit ).
NGL after seeing the hints we can see that to make a target sum we need either 0, 1, 2 moves:\nlets say m = min(a[i], a[n-1-i]), M = max(a[i], a[n-1-i])\n\n1. w
NGL after seeing the hints we can see that to make a target sum we need either 0, 1, 2 moves:\nlets say m = min(a[i], a[n-1-i]), M = max(a[i], a[n-1-i])\n\n1. when target sum is [2, m] we need to make 2 changes\n2. when target sum is [m+1, M+Limit] we need to make 1 change\n3. when target sum is [M+Limit+1, 2Limit] we again need to make 2 changes.\n\nSo we can set marker points in our prefix array just like when we need to find most/least busy Interval Schedule problem.\n\n```\nclass Solution {\npublic:\n    int minMoves(vector<int>& a, int l){\n        int i, n = a.size();\n        int p[2*l+10];\n        memset(p, 0, sizeof(p));\n        int N = n/2;\n        for(i=0;i<N;i++){\n            int m = min(a[i], a[n-1-i]), M = max(a[i], a[n-1-i]);\n            p[1] += 2, p[m+1] += -1, p[M+l+1] += 1;\n            p[m+M] += -1;\n            p[m+M+1] += 1;\n        }\n        int ans = INT_MAX;\n        for(i=1;i<2*l+1;i++){\n            p[i] += p[i-1];\n            ans = min(ans, p[i]);\n        }\n        \n        return ans;\n    }\n};\n```\n
['C', 'Prefix Sum']