Java  Using Queue
\nclass Solution {\n    public int minMaxGame(int[] nums) {\n        Queue<Integer> q = new LinkedList<>();\n        for(int i : nums){\n            q.add(i);\n
```\nclass Solution {\n    public int minMaxGame(int[] nums) {\n        Queue<Integer> q = new LinkedList<>();\n        for(int i : nums){\n            q.add(i);\n        }\n        while(q.size() != 1){\n            int size = q.size();\n            int count = 0;\n            for(int i = 0;i<size/2;i++){\n                if(count % 2 == 0){\n                    int x = q.poll();\n                    int y = q.poll();\n                    q.add(Math.min(x, y));\n                }\n                else{\n                    q.add(Math.max(q.poll(), q.poll()));\n                }\n                count++;\n            }\n        }\n        return q.poll();\n    }\n}\n```
['Queue', 'Java']