Organizing a “speedback” in a functional way


Speedback is the merging of speed-dating with feedback: a 2 min. 1-on-1 talk with all members of a group of people.

I’m in a team and I want to plan the ideal speedback setup. I want to group people in a way that maximizes the concurrency of simultaneous 1-on-1s so we reduce the total time of the sessions.

I found a library that gives me all combinations:

setOf("alexandre", "sergiu", "joana", "tiago", "susana", "david")     .combinations(2) 

This returns all pairs. Now the grouping. The first could be:

"alexandre" with "sergiu" "joana" with "tiago" "susana" with "david" 

then it gets harder..

Do you know which Kotlin functional method could help me (or can you hint about the solution)?