← Questions
Knockout tournament by rank, then build the bracket
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Players are listed by rank, where a smaller number is a better player. Neighbours play each other (index 0 against 1, 2 against 3, and so on) and the better rank advances, round after round, until one player is left.
- Simulate the tournament and output each round's survivors. Handle an odd number of players.
- Go the other way: build a starting order in which, of any two players, the better-ranked one is knocked out later.
One report ended with questions on storing and querying match records in a database.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
