This is a gud question thougth the answer is not bipartitie matching If the graph has a cycle then answer is impossible The next question is whether the graph is connected ? say 1)when the graph is connected then it should be a tree to get split into two groups easily by assigning some colors / (some 0 / 1) like else 2) each component is a tree which can be split into two Correct me if am wrrong
On Tue, Jul 5, 2011 at 11:55 AM, Nitish Garg <[email protected]> wrote: > Given a network of the employees of a company such that edges are between > those employees who are friends to each other. Divide the employees into two > teams such that no two people who are friends to each other are in the same > team? > > I was asked this question during the phonic interview with Google, though I > couldn't come across the correct solution at that time, I want to discuss > this question now. > To start with, is this a question of Bipartite Matching? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/i_bA44doHU8J. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
