C++ Easy Solution
\nclass Solution {\npublic:\n    vector<int> earliestAndLatest(int n, int firstPlayer, int secondPlayer) {\n        vector<int> result;\n        int early= 1, l
```\nclass Solution {\npublic:\n    vector<int> earliestAndLatest(int n, int firstPlayer, int secondPlayer) {\n        vector<int> result;\n        int early= 1, latest= 1;\n        vector<int> players;\n        for(int i=1; i<=n; i++) players.push_back(i);\n        int i=0, j=players.size()-1;\n        while(1){\n            i=0;\n            j=players.size()-1;\n            if(players.size()%2==1) players.push_back((players.size()/2)+1);\n            while(i<j){\n                if(players[i]==firstPlayer and players[j]==secondPlayer){\n                    result.push_back(early);\n                    break;\n                }\n                else if(players[i]==firstPlayer)\n                    players.erase(players.begin() + j);\n                else if(players[j]==secondPlayer)\n                    players.erase(players.begin() + i);\n                else if(players[i]>firstPlayer and players[i]<secondPlayer and (players[j]<firstPlayer or players[j]>secondPlayer))\n                    players.erase(players.begin() + j);\n                else if(players[j]>firstPlayer and players[j]<secondPlayer and (players[i]<firstPlayer or players[i]>secondPlayer))\n                    players.erase(players.begin() + i);\n                else\n                    players.erase(players.begin() + i);\n                i++;\n                j--;\n            }\n            if(players[i]==firstPlayer and players[j]==secondPlayer)\n                break;\n            early++;\n            sort(players.begin(), players.end());\n        }\n        result.push_back(early);\n        players.clear();\n        \n        for(int i=1; i<=n; i++) players.push_back(i);\n        i=0;\n        j=players.size()-1;\n        while(1){\n            i=0;\n            j=players.size()-1;\n            if(players.size()%2==1) players.push_back((players.size()/2)+1);\n            while(i<j){\n                if(players[i]==firstPlayer and players[j]==secondPlayer){\n                    result.push_back(early);\n                    break;\n                }\n                else if(players[i]==firstPlayer)\n                    players.erase(players.begin() + j);\n                else if(players[j]==secondPlayer)\n                    players.erase(players.begin() + i);\n                else if(players[i]>firstPlayer and players[i]<secondPlayer and (players[j]<firstPlayer or players[j]>secondPlayer))\n                    players.erase(players.begin() + i);\n                else if(players[j]>firstPlayer and players[j]<secondPlayer and (players[i]<firstPlayer or players[i]>secondPlayer))\n                    players.erase(players.begin() + i);\n                else\n                    players.erase(players.begin() + j);\n                i++;\n                j--;\n            }\n            if(players[i]==firstPlayer and players[j]==secondPlayer)\n                break;\n            latest++;\n            sort(players.begin(), players.end());\n        }\n        result.push_back(latest);\n        return result;\n    }\n};\n```\n//Not working
[]