python/java easy solution
\tclass Solution:\n\t\tdef minMaxGame(self, nums: List[int]) -> int:\n\t\t\twhile len(nums) != 1:\n\t\t\t\tnewNums = []\n\t\t\t\tcnt = 0\n\t\t\t\tfor i in range
\tclass Solution:\n\t\tdef minMaxGame(self, nums: List[int]) -> int:\n\t\t\twhile len(nums) != 1:\n\t\t\t\tnewNums = []\n\t\t\t\tcnt = 0\n\t\t\t\tfor i in range(0, len(nums), 2):\n\t\t\t\t\tif cnt % 2 == 0:\n\t\t\t\t\t\tnewNums.append(min(nums[i], nums[i + 1]))\n\t\t\t\t\telse:\n\t\t\t\t\t\tnewNums.append(max(nums[i], nums[i + 1]))\n\t\t\t\t\tcnt += 1\n\t\t\t\tnums = newNums\n\t\t\treturn nums[0]\n\n\n\tclass Solution {\n\t\tpublic int minMaxGame(int[] nums) {\n\t\t\twhile (nums.length != 1) {\n\t\t\t\tint[] newNums = new int[nums.length / 2];\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int i = 0; i < nums.length; i += 2) {\n\t\t\t\t\tif (cnt % 2 == 0) {\n\t\t\t\t\t\tnewNums[i / 2] = Math.min(nums[i], nums[i + 1]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewNums[i / 2] = Math.max(nums[i], nums[i + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tcnt ++;\n\t\t\t\t}\n\t\t\t\tnums = newNums;\n\t\t\t}\n\t\t\treturn nums[0];\n\t\t}\n\t}
[]