← Microsoft questions

Find the celebrity in a party

Filed under Microsoft · Also reported at Infoedge

In a party of n people, a celebrity is someone who is known by everyone else but knows no one. Given a helper function knows(A, B) that returns true if A knows B, find the celebrity in O(n) time using…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.