Separate groups of people based on members
Posted
by tevch
on Stack Overflow
See other posts from Stack Overflow
or by tevch
Published on 2010-04-14T21:03:36Z
Indexed on
2010/04/14
21:13 UTC
Read the original article
Hit count: 318
algorithm
I have groups of people. I need to move groups with at least one same member as far as possible from each other.
Example:
GroupA - John, Bob, Nick
GroupB - Jack, Nick
GroupC - Brian, Alex, Steve
As you can see GroupA and GroupB overlap(they both contain Nick) I need an algorithm to set groups as GroupA->GroupC->GroupB
Thank you
© Stack Overflow or respective owner