Easy python solution TC:O(logn) space complexity:O(n)
Approach:\n\n    Check if the length of the input list nums is less than 2. If so, return the single element in the list.\n    While the length of nums is great
**Approach**:\n\n*    Check if the length of the input list nums is less than 2. If so, return the single element in the list.\n*    While the length of nums is greater than 1, perform the following steps:\n*    Create a new list newNums with a length of half the length of nums.\n*    Iterate over the indices of nums in steps of 2.\n*    If the index i is even, set the corresponding element in newNums to the minimum of nums[i] and nums[i+1]. Otherwise, set it to the maximum.\n*    Update nums to newNums.\n*   Return the first element of the updated list nums, which is the result of the min-max game operation.\n\n**Time Complexity:**\nThe time complexity of this solution is O(nlog\u2061n)O(nlogn), where nn is the length of the input list nums. This is because in each iteration of the while loop, the size of the list is halved.\n\n**Space Complexity:**\nThe space complexity of this solution is O(n)O(n), where nn is the length of the input list nums. This is because a new list of length n/2n/2 is created in each iteration of the while loop.\n\n\n**Python Solution:**\n\n**python**\n\n\tclass Solution:\n\t\tdef minMaxGame(self, nums: List[int]) -> int:\n\t\t\tif len(nums) < 2:\n\t\t\t\treturn nums[0]\n\t\t\twhile len(nums) > 1:\n\t\t\t\tnewNums = [0]*(len(nums)//2)\n\t\t\t\tfor i in range(0, len(nums)//2):\n\t\t\t\t\tif i % 2 == 0:\n\t\t\t\t\t\tnewNums[i] = min(nums[2*i], nums[2*i+1])\n\t\t\t\t\telse:\n\t\t\t\t\t\tnewNums[i] = max(nums[2*i], nums[2*i+1])\n\t\t\t\tnums = newNums\n\t\t\treturn nums[0]\n
['Python', 'Python3']