Python Program to Solve the Celebrity Problem

What is Celebrity Problem

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 does not know anyone in the party. We can only ask questions like does A know B? . Find the stranger (celebrity) in minimum number of questions.

Problem Statement:
The celebrity problem is the problem of finding the celebrity among n people. A celebrity is someone who doesn’t know anyone (including themselves) but is known by everyone.

Python Program to Solve the Celebrity Problem source code

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Editorial Staff

Editorial Staff at FreeWebMentor is a team of professional developers.