← Questions

Players whose rank is fixed by game results

0
GoogleCodingLast asked Aug 2026

There are n players, numbered 0 to n - 1, and a list of game results where a pair (u, v) means player u beat player v. Assume the results come from one strict ranking, so there are no cycles.

Return every player whose exact rank is determined by the results: a player is fixed when the number of players known to be below them plus the number known to be above them equals n - 1.

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