Problem
Find all the combination of two in a team
Solution
|
|
Result:
|
|
Let’s up the game
now we want to arrange the combinations results in a way that none of these guys are on call twice in a row
- Step 1: put people 2 by 2 in a list
|
|
Result:
|
|
- Step 2: iterate this list an pickup people at least spaced out by len(list)/2 - 1
|
|
Result:
|
|
This does not work til the end. But for the current needs it fits. It will give a basic scheduled team for a few weeks.
I am pretty sure we can find some nicer stuff using grah exploration. My leftover of on graph are quite far away, I’ll try go back in there and see if I can dig some stuff.
If you feel like you can contribute, feel free to PR/Comment on github, on this repo.