Back to Questions

Find the Celebrity (Graph)

144.2K viewsAsked at Uber
Easy

Question Explain

In a party of $N$ people, a celebrity is known by everyone but knows no one. Find the celebrity in $O(N)$ time by modeling the relationships as a graph.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Find the Celebrity (Graph) - Interview Question