Kartik bhaiya and the celebrity

Hi
How to solve this question using stack? please tell me the algorithm.

hi @akshitabansal321, you can do this by eliminating one person each time, say you take 2 person ask them if he knows that person if ans is yes then he cant be celeb as celeb dont know anyone if ans is no then reject the other person as everyone knows celeb and he is not known to first guy in this way you’ll ask atmost n-1 questions

how to implement it?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.