C++ bit mask DFS solution.
Idea\n- seperate the team to left side and right side, use bit mask to try all the winning status of left side and generate the next round of players and go to 
### Idea\n- seperate the team to left side and right side, use bit mask to try all the winning status of left side and generate the next round of players and go to the next round.\n- if we can match first player and second player in the current round, then calculate the max and min round.\n- if we can not find first and second player in current array, we can early return.\n\n### Complexity\n- Time: O(2 ^ (n / 2) * n)\n- Space: O(n)\n\n### Solution\n- C++\n```\nclass Solution {\npublic:\n    int mn = 10000;\n    int mx = 0;\n    int first;\n    int second;\n    void dfs(vector<int> &arr, int round) {\n        int size = arr.size() / 2;\n        if(arr.size() == 1) return;\n        for(int i = 0; i < size; i++) {\n            //if we can match first and second in this round.\n            if(arr[i] == first && arr[arr.size() - i - 1] == second) {\n                mn = min(mn, round);\n                mx = max(mx, round);\n                return;\n            }\n        }\n        bool f1 = false, f2 = false;\n        for(auto n : arr) {\n            f1 |= n == first;\n            f2 |= n == second;\n        }\n        if(!f1 || !f2) { //can not find first and second player.\n            return;\n        }\n        vector<int> nextarr(size + (arr.size() % 2));\n        int m = (1 << size) - 1;\n        for(int i = 0; i <= m; i++) { //try all the winning status for the left side players.\n            int left = 0, right = nextarr.size() - 1;\n            for(int j = 0; j < size; j++) {\n                if((1 << j) & i) { //left side player win, put it to the next array.\n                    nextarr[left++] = arr[j];\n                }else { //right side player win.\n                    nextarr[right--] = arr[arr.size() - j - 1];\n                }\n                \n            }\n            if(arr.size() % 2) { //middle player go to the next round.\n                nextarr[left] = arr[arr.size() / 2];\n            }\n            dfs(nextarr, round + 1);\n        }\n    }\n    vector<int> earliestAndLatest(int n, int firstPlayer, int secondPlayer) {\n        vector<int> arr(n);\n        for(int i= 1; i <= n; i++) {\n            arr[i - 1] = i;\n        }\n        first = firstPlayer;\n        second = secondPlayer;\n        dfs(arr, 1);\n        return {mn, mx};\n    }\n};\n```
[]