Skip to content

Instantly share code, notes, and snippets.

@kruszczynski
Created August 25, 2026 09:30
Show Gist options
  • Select an option

  • Save kruszczynski/59cbb7e49471218050929689cbf67bbc to your computer and use it in GitHub Desktop.

Select an option

Save kruszczynski/59cbb7e49471218050929689cbf67bbc to your computer and use it in GitHub Desktop.
Tennis tournament exercise, part 05

Stage 5: a full season

The rights holders come back with the real fixture list.

matches = [[f"player{i}", f"player{i+1}"] for i in range(50_000)]

Run it.

  • What is the time and space complexity of your solution, in terms of the number of players and the number of matches?
  • If it fails, why does it fail at roughly the size it fails at?
  • Fix it. Then explain why your fix is a real fix rather than a bigger bucket.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment