Java simple solution
java\nclass Solution {\n    public int minMoves(int[] nums, int limit) {\n        int[] array = new int[limit*2+2];\n        HashMap<Integer, Integer> hash = ne
```java\nclass Solution {\n    public int minMoves(int[] nums, int limit) {\n        int[] array = new int[limit*2+2];\n        HashMap<Integer, Integer> hash = new HashMap<>();\n        for (int i = 0; i < nums.length/2; i++) {\n            int minValue = Integer.min(nums[i], nums[nums.length-i-1]);\n            int maxValue = Integer.max(nums[i], nums[nums.length-i-1]);\n            // initial by twice-change\n            array[0] += 2;\n            // [minValue+1, maxValue+limit], only change once (minValue+maxValue, no need change, specially)\n            array[minValue+1] -= 1;\n            array[maxValue+limit+1] += 1;\n            hash.put(minValue+maxValue, hash.getOrDefault(minValue+maxValue, 0)+1);\n            // (maxValue+limit, limit+limit], change twice\n        }\n        int move = nums.length;\n        int currentMove = 0;\n        for (int i = 0; i <= limit*2; i++) {\n            currentMove += array[i];\n            move = Integer.min(move, currentMove-hash.getOrDefault(i, 0));\n        }\n        return move;\n    }\n\n    static public void test() {\n        Solution s = new Solution();\n        System.out.println(s.minMoves(new int[]{1,2,4,3}, 4));\n        System.out.println(s.minMoves(new int[]{1,2,2,1}, 2));\n        System.out.println(s.minMoves(new int[]{1,2,1,2}, 2));\n    }\n}\n```
['Java']