[Python] Consider all possibilities
We consider every possible outcome of the matches.\n\nThe worst case complexity is O(n2^0.75n), which is not too bad.\n\nWe begin with a maximum of 28 players, 
We consider every possible outcome of the matches.\n\nThe worst case complexity is O(n*2^0.75n), which is not too bad.\n\nWe begin with a maximum of 28 players, which will have 14, 7, 4, 2, 1 in successive rounds.\n\nLet\'s say we have 2^14 possibilities that will advance the first round. For each of these possibility we consider 2^7 outcomes. The complexity to calculate the possibilites of the next round is 28*2^21=58720256, which is reasonable.\n\nThere are (28-2 choose 7-2)=65780 possibilities for the second round, which makes successive computations even more reasonable. \n\n```\nclass Solution:\n    def earliestAndLatest(self, n: int, firstPlayer: int, secondPlayer: int) -> List[int]:\n                \n        round_num = 0\n        valid_rounds = set()\n        possibilities = set([tuple(range(1,n+1))])\n        \n        while possibilities:\n            round_num += 1\n\n            next_possibilities = set()\n            num_players = len(next(iter(possibilities)))\n            num_matches = num_players // 2\n            \n            for possibility in possibilities:\n                for a,b in zip(possibility[:num_matches], possibility[::-1]):\n                    if a == firstPlayer and b == secondPlayer:\n                        valid_rounds.add(round_num)\n                        continue\n\n                for comb in itertools.product([0,1], repeat=num_matches):\n                    next_possibility = [possibility[i] if c else possibility[~i] for i,c in enumerate(comb)]\n\n                    if num_players%2 == 1:  # center player automatically advance\n                        next_possibility.append(possibility[num_matches])\n                    \n                    if firstPlayer not in next_possibility or secondPlayer not in next_possibility:\n                        continue\n                    \n                    next_possibilities.add(tuple(sorted(next_possibility)))\n            \n            possibilities = next_possibilities\n            \n        return [min(valid_rounds), max(valid_rounds)]\n```
[]