Simple loop approach || C++
\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        if(nums.size()==1){\n            return nums[0];\n        }\n        vector<int>an
```\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        if(nums.size()==1){\n            return nums[0];\n        }\n        vector<int>ans=nums;\n        while(ans.size()!=1){\n            vector<int>v1;\n            int i=1,f=1;\n            while(i<ans.size()){\n                if(f==1){\n                    v1.push_back(min(ans[i-1],ans[i]));\n                    f=0;\n                }else{\n                    v1.push_back(max(ans[i-1],ans[i]));\n                    f=1;\n                }\n                i+=2;\n            }\n            ans=v1;\n        }\n         return ans[0];\n    }\n};\n```
['Array', 'Math', 'C']