Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 2
    how do you manage home vs away balances? Commented Oct 27, 2015 at 4:20
  • This doesn't actually work - in this simple rotation algorithm, the rotating teams which are 2 slots apart (2/4, 3/5) will never play. Commented Jun 6, 2018 at 20:50
  • @mdryden it does work. Check it better and please remove your comment. Commented Jun 7, 2018 at 6:31
  • @PieterB I was thinking that it would work, but it actually doesn't work if there are an odd number of teams, as the ones that are right next to each other (like 4 and 5) will never play each other. You can see it pretty easily at the end with the 1, and also at the other end because you have the dangling team (with the bye) Here's a good response that also deals with the odd number: stackoverflow.com/a/6649732/6489306 Commented Jul 4, 2018 at 22:08
  • @ragingasiancoder if there's an odd number of teams, add a dummy team. The answer you linked describes the exact same solution as I presented. Commented Jul 5, 2018 at 6:37