🔥 1️⃣ Using Recursion, 2️⃣ Only Single Array 🔥
Intuition\n\n- easy\n- most of the logic was given in description only\n- same logic which any one will think\n \n\n# Approach\n\n# 1. Recursion\n- storing next
# Intuition\n\n- easy\n- most of the logic was given in description only\n- same logic which any one will think\n \n\n# Approach\n\n# 1. Recursion\n- storing next min max array\n- in new array n return until only one element is left\n```java\nclass Solution {\n    public int minMaxGame(int[] nums) {\n        int n = nums.length;\n        if(n == 1)\n            return nums[0];\n        \n        int new_arr[] = new int[n/2];\n\n        for(int i=0; i<new_arr.length; i++)\n            new_arr[i] = i%2==0 ? Math.min(nums[2*i], nums[2*i+1]) : Math.max(nums[2*i], nums[2*i+1]);\n\n        return minMaxGame(new_arr);\n    }\n}\n```\n\n# 2. Only Single Array\n- Store in Same Array\n- Multi loops\n\n```java\nclass Solution {\n    public int minMaxGame(int[] nums) {\n        int n = nums.length;\n        while(n>1){\n            for(int i=0; i<n/2; i++)\n                nums[i] = i%2==0 ? Math.min(nums[2*i], nums[2*i+1]) : Math.max(nums[2*i], nums[2*i+1]);\n            n/=2;\n        }\n        return nums[0];\n    }\n}\n```\n.
['Array', 'Recursion', 'Java']