easy to understand beats %100 in time
Approachwe use a loop to continue processing the array until its length is reduced to 1. in each iteration we create a new array by processing pairs of elements

# Approach
we use a loop to continue processing the array until its length is reduced to 1. in each iteration we create a new array by processing pairs of elements from the current array. then we alternate between taking the minimum and maximum of each pair based on their index in the new array. finally we can replace the current array with the new array and repeat the process until like i said before the length is reduced to one



# Complexity
- Time complexity:
O(Log(N))

- Space complexity:
O(1)

# Code
```python3 []
class Solution:
    def minMaxGame(self, nums: List[int]) -> int:
        while len(nums)>1:
            nn=[]
            for i in range(len(nums)//2):
                if i%2==0:
                    nn.append(min(nums[2*i],nums[2*i+1]))
                else:
                    nn.append(max(nums[2*i],nums[2*i+1]))
            nums=nn
        return nums[0]
```
['Python3']