Welcome to the first week of June!
Today's problem is a fun one. Your goal is to create a round robin tournament scheduler. That is, given an array of 8 teams or more figure out a way to, as evenly as possible, divide them in to divisions of 3, 4, or 5 teams. Then you'll need to create a schedule for each group so that each team plays each other exactly one time. Here is an example:
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'] Division 1 A vs B C vs D A vs C B vs D D vs A B vs C Division 2 E vs F G vs H E vs G F vs H H vs E F vs G
Comments:
Anonymous - 10 years, 6 months ago
Finally first! Python 2.7.
reply permalink