Facebook Interview Question
349 Interview Reviews |
Back to all Facebook Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Engineer Intern at Facebook:
given the utitlies getFriend(User u) and areFriends(User u1, User u2), write the function which takes as parameter the array of users and return a bool saying if you can divide the users in 2 groups s.t. if u1 and u2 both belong to a certain group, they are not friends.
See more for this Facebook Software Engineer Intern Interview
Helpful Question?
Yes |
No
Inappropriate?



0 of 1 people found this helpful
by carvajal:
After that you just have to say if the graph is bipartite.
Is quite easy actually, a graph is bipartite if and only if it has not odd length cycles.
http://en.wikipedia.org/wiki/Bipartite_graph