Algorithm to form two teams from a list of 10 people based on skillindex

I am trying to come up with an algorithm that checks all possible combinations in a list of players and makes two teams of 5 with the closest possible difference in total skillindex. So far I have come up with the following exhausting perm…