Enumerate Round-Robin Match Schedules (Generate All Possible Pairings by Round)

There are n teams labeled 1..n that need to play a round-robin schedule:

  • There are n-1 rounds when n is even, or n rounds when n is odd (introduce a bye each round).
  • In each round, ea...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: