In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like “does A know B? “. Find the stranger (celebrity) in minimum number of questions.
http://www.geeksforgeeks.org/the-celebrity-problem/
http://www.geeksforgeeks.org/the-celebrity-problem/
No comments:
Post a Comment