Python sweep-line solution
\ndef minMoves(self, nums: List[int], limit: int) -> int:\n\tcount, n = [0]*(2*limit+2), len(nums)\n\tfor i in range(n//2):\n\t\tx, y, s = min(nums[i], nums[~i]
```\ndef minMoves(self, nums: List[int], limit: int) -> int:\n\tcount, n = [0]*(2*limit+2), len(nums)\n\tfor i in range(n//2):\n\t\tx, y, s = min(nums[i], nums[~i]), max(nums[i], nums[~i])+limit, nums[i]+nums[~i]\n\t\tcount[x+1] -= 1\n\t\tcount[s] -= 1\n\t\tcount[s+1] += 1\n\t\tcount[y+1] += 1\n\n\treturn n+min(accumulate(count))\n```
[]