Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 277. Find the Celebrity
Given n people and an API knows(a, b), find the celebrity — someone who is known by everyone else but who knows no one — or return -1 if none exists. The core challenge is to identify the candidate with minimal knows() calls (typically via pairwise elimination) and then verify incoming/outgoing relationships in O(n) time and O(1) space.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early October, 2025
Mid-level
Late September, 2025
Senior
Similar to Leetcode 277 celebrity problem with a variation of input given as a 2D matrix.
Late May, 2025
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.