Python | Loop | Easy to Understand | Fast 90%+
Python 3 Solution\n\n\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        \n        while len(nums) > 1:\n            newNums = [0]*(le
**Python 3 Solution**\n\n```\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        \n        while len(nums) > 1:\n            newNums = [0]*(len(nums)//2)\n            for i in range(0, len(nums)//2):\n                if i % 2 == 0:\n                    newNums[i] = min(nums[2 * i], nums[2 * i + 1])\n                else:\n                    newNums[i] = max(nums[2 * i], nums[2 * i + 1])\n            nums = list(newNums)\n            \n        return nums[0]\n```\n\n**Explanation:**\n\n  * While the array is greater than size 1, we:\n  * Create an empty array of half the length.\n  * Loop through half of the nums, and apply the logic specified.\n  * Stop when we have a array of size 1.\n\n\n**Complexity:**\n\n* Time: `O(n)`\n* Space: `O(n)`\n\nwhere `n` is the size of the array.
['Python']