C++ || Easy implementation
\nclass Solution {\n    vector<int> helper(vector<int>& nums,int n){\n        vector<int> ans;\n        for(int i=0;i<n/2;i++){\n            if(i%2 == 0) ans.em
```\nclass Solution {\n    vector<int> helper(vector<int>& nums,int n){\n        vector<int> ans;\n        for(int i=0;i<n/2;i++){\n            if(i%2 == 0) ans.emplace_back(min(nums[2*i],nums[2*i+1]));\n            else ans.emplace_back(max(nums[2 * i], nums[2 * i + 1]));\n        }\n        return ans;\n    }\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n=size(nums);\n        if(n == 1) return nums[0];\n        while(true){\n           vector<int> arr = helper(nums,n);\n            n = arr.size();\n            nums = arr;\n            if(n == 1) return  arr[0];\n        }\n        return 0;\n    }\n};\n```
['C', 'C++']