C++ | Simulation (Recursive) | Time: O(n) | Auxiliary Space: O(logn)
\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n = nums.size();\n        if (n == 1) return nums[0];\n        int j = 0;\n   
```\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n = nums.size();\n        if (n == 1) return nums[0];\n        int j = 0;\n        for (int i = 0; i < n; i += 2) {\n            nums[j++] = j & 1\n                ? max(nums[i], nums[i + 1])\n                : min(nums[i], nums[i + 1]);\n        }\n        nums.resize(j);\n        return minMaxGame(nums);\n    }\n};\n```
[]