Thursday, December 12, 2013

[Fab.com] Find the celebrity

Given a function know(A,B) which returns true if A knows B , otherwise false. Now there is one celebrity who is known to everyone and who does not know anyone. Given an array , find the celebrity in less than linear time.

No comments:

Post a Comment