Java | 0 ms | 100% faster
\npublic int minMaxGame(int[] nums) {\n        if (nums.length == 1)\n\t\treturn nums[0];\n\n\t\tint ans[] = new int[nums.length / 2];\n\t\tfor (int i = 0, j = 
```\npublic int minMaxGame(int[] nums) {\n        if (nums.length == 1)\n\t\treturn nums[0];\n\n\t\tint ans[] = new int[nums.length / 2];\n\t\tfor (int i = 0, j = 1, k = 0; i < nums.length && j < nums.length;) {\n\t\t\tif (k % 2 == 0) {\n\t\t\t\tans[k] = Math.min(nums[i], nums[j]);\n\t\t\t} else {\n\t\t\t\tans[k] = Math.max(nums[i], nums[j]);\n\t\t\t}\n\t\t\ti += 2;\n\t\t\tj += 2;\n\t\t\tk++;\n\t\t}\n\n\t\treturn minMaxGame(ans);\n    }\n```
['Java']