Python Solution | O(N) TC | Two Way - Iterative and Recursive
Code\n\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        while len(nums) > 1:\n            endPoint = len(nums)//2\n            store
# Code\n```\nclass Solution:\n    def minMaxGame(self, nums: List[int]) -> int:\n        while len(nums) > 1:\n            endPoint = len(nums)//2\n            store = [0] * (endPoint)\n            for i in range(0,endPoint):\n                store[i] = (max if i % 2 else min)(nums[2*i],nums[2*i+1])\n            nums[:] = store\n        return nums[0]\n\n\n    def minMaxGame(self, nums: List[int]) -> int:\n        return nums[0] if len(nums) == 1 else self.minMaxGame(\n            [\n                (max if i % 2 else min)(nums[2*i],nums[2*i+1]) for i in range(\n                    0,\n                    len(nums)//2\n                    )\n                ]\n            )\n\n```
['Python3']