✅C++ | O(1) Space | Easy to Understand | 100% faster
\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n=nums.size();\n        while(n>1){\n            int k=0;\n            for(int
```\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n=nums.size();\n        while(n>1){\n            int k=0;\n            for(int i=0;i<n/2;i++){\n                if(k%2==0) nums[k]=min(nums[2*i],nums[2*i+1]);\n                else nums[k]=max(nums[2*i],nums[2*i+1]);\n                k++;\n            }\n            n/=2;\n        }\n        return nums[0];\n    }\n};\n```
['C++']