C++ Explained solution
```\n/\n        \n        min sum= 2\n        max sum= 2lim\n        \n        so we needs to make the sum of pair = X = nums[i]+nums[j]\n        where x belong
```\n/*\n        \n        min sum= 2\n        max sum= 2*lim\n        \n        so we needs to make the sum of pair = X = nums[i]+nums[j]\n        where x belongs to the range [2,2*lim]\n        \n        \n        for any pair [nums[i],nums[j]]\n        \n        mn=min(nums[i],nums[j])\n        mx=max(nums[i],nums[j])\n        \n        X=mn+mx\n        \n1. for X=2 , change each to 1   (2 changes)\n\n2. for X=mn+1, change mx to 1  (1 change)\n   for X=mx+lim, change mn to lim (1 change)\n \n3.  for X=2*lim, change both to lim (2 changes)\n        \n     \nTotal Range of sum :  [2...........................................2*lim] \n                            \n                            \n[[2....X....mn] [mn+1.......X....mx+lim] [mx+lim+1.....X.....2*lim]]\n\n       ||                   ||                          ||\n    2 changes             1 change                   2 changes\n    \n    \n    \nwe make a vector changes\n\nchanges[X] = total no of changes needed to make each pair sum equals to X\n\nans= min (changes[X])\n\n\n\nNOTE: for X=mn+mx\n      we need 0 changes\n\n*/\n        \nclass Solution {\npublic:\n    int minMoves(vector<int>& nums, int lim) {        \n        \n        int n=nums.size();\n        \n        vector<int>changes(2*lim+2,0);\n        \n        int i=0,j=n-1;\n        \n        int mn,mx;\n        while(i<j){\n            \n            mn=min(nums[i],nums[j]);\n            \n            mx=max(nums[i],nums[j]);\n            \n            changes[2]+=2, changes[mn+1]-=2;\n            \n            changes[mn+1]+=1, changes[mx+lim+1]-=1;\n            \n            changes[mx+lim+1]+=2, changes[2*lim+1]-=2;\n            \n     //       for X=mn+mx  we need 0 changes\n            \n            changes[mn+mx]--, changes[mn+mx+1]++;\n           \n           i++,j--;\n   \n        }\n        \n        for(int i=2;i<=2*lim;i++){\n            changes[i]+=changes[i-1];\n        }\n        \n        int ans=INT_MAX;\n        \n        for(int i=2;i<=2*lim;i++){\n            ans=min(ans,changes[i]);\n        }\n            \n        return ans;\n        \n    }\n};
['C']