Better HN
topnewbestaskshowjobs
Log inSign up

ice-water

1 karma · joined Feb 24, 2025 (1y ago) · 1 submissions

Submissions

comment 1y ago · link · parent

A round-robin tournament with n players, where you have the results (win/lose) of all the games and you must determine whether there is a player who won all his games.

The input is the n(n-1)/2 bits indicating the results, but the existence of a winner can be determined in O(n) steps (fun exercise).