C++ || Brute Force
\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        while(nums.size()!=1){\n        vector<int> res;\n           bool flag = true;\n  
```\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        while(nums.size()!=1){\n        vector<int> res;\n           bool flag = true;\n            for(int i=0;i<nums.size();i+=2){\n                if(flag == true){\n                    res.push_back(min(nums[i],nums[i+1]));\n                    flag = false;\n                }\n                else{\n                    res.push_back(max(nums[i],nums[i+1]));\n                    flag = true;\n                }\n            }\n            nums.clear();\n            nums = res;\n        }\n        return nums[0];\n    }\n};\n```
['C', 'C++']