balance

Algorithm - Attempting to balance out team skill levels, while having a equal amount of players

I have 3 teams, They have 2 players, 3 players and 7 players. There is 18 players sitting on the sidelines waiting to be assigned. Each player has their own skill level, meaning a level 1 is not going to defeat a level 10. I want to balance the teams out to 10 players each. And I want to try get all...