[C++] || Easy constant space
Please do upvote if you like the solution:)\n\n\n\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n = nums.size();\n        \n 
**Please do upvote if you like the solution:)**\n\n\n```\nclass Solution {\npublic:\n    int minMaxGame(vector<int>& nums) {\n        int n = nums.size();\n        \n        if(n==1)\n            return nums[0];\n        \n        int ans = -1;\n        n = n/2;\n        \n        while(n>=1){\n            for(int i=0; i<n; i++)\n            {\n                if(i%2==0)\n                    nums[i] = min(nums[2 * i], nums[2 * i + 1]);\n                else\n                    nums[i] = max(nums[2 * i], nums[2 * i + 1]);\n            }\n            \n            if(n==1)\n                return nums[0];\n            n /= 2;\n        } \n            \n         \n            \n        return ans;\n    }\n};\n```
['C', 'C++']