python3 code
Code\n\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        newNums = []\n        isMax = False\n        while len(nums) != 1:\n        
# Code\n```\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        newNums = []\n        isMax = False\n        while len(nums) != 1:\n            for i in range(0, len(nums) - 1, 2):\n                if not isMax:\n                    newNums.append(min(nums[i], nums[i + 1]))\n                    isMax = True\n                else:\n                    newNums.append(max(nums[i], nums[i + 1]))\n                    isMax = False\n            nums = newNums\n            newNums = []\n        return nums[0]\n```\n\n![image.png](https://assets.leetcode.com/users/images/bd7ea14e-525c-4c37-9069-0f237d51b3af_1671483731.2972088.png)\n![image.png](https://assets.leetcode.com/users/images/6a3a43fb-b478-4d05-b7a5-d53444af94e0_1671483750.149535.png)\n
['Python3']