A straightforward solution by recursion
Code\n\nfunc minMaxGame(nums []int) int {\n\tn := len(nums)\n\tif n == 1 {\n\t\treturn nums[0]\n\t}\n\n\tvar mode bool\n\tnewNums := make([]int, 0, len(nums)/2)
# Code\n```\nfunc minMaxGame(nums []int) int {\n\tn := len(nums)\n\tif n == 1 {\n\t\treturn nums[0]\n\t}\n\n\tvar mode bool\n\tnewNums := make([]int, 0, len(nums)/2)\n\tfor i := 0; i < n; i += 2 {\n\t\to := nums[i]\n\t\tt := nums[i+1]\n\n\t\tif mode {\n\t\t\tnewNums = append(newNums, max(o, t))\n\t\t} else {\n\t\t\tnewNums = append(newNums, min(o, t))\n\t\t}\n\n\t\tmode = !mode\n\t}\n\n\treturn minMaxGame(newNums)\n}\n\nfunc max(x, y int) int {\n\tif x < y {\n\t\treturn y\n\t}\n\treturn x\n}\n\nfunc min(x, y int) int {\n\tif x > y {\n\t\treturn y\n\t}\n\treturn x\n}\n\n```
['Array', 'Go']