Hacker News new | ask | show | jobs
by 0x445442 2384 days ago
It's even easier than that... return players - 1. The trick is knowing in any single elimination tournament in order for there to be one winner there must be n - 1 losers.

edit: Also, I'm not sure your solution works for 13 players.

1 comments

I wrote that it was `n-1` in my comment. Doesn't seem like much of a trick to me.