Available question text
Given n people labeled 0 to n-1 and an API knows(a, b) that returns true if person a knows person b, find the celebrity — someone who is known by everyone else but 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, achieving O(n) time and O(1) space.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 2 records
HubSpot
LeetCode 277. Find the Celebrity
Reported Oct 31, 2026 · 5 source reports
SENIOR, STAFF
Source snapshot: Nov 12, 2026
View sourceLinkedIn
LeetCode 277. Find the Celebrity
Reported Oct 25, 2026 · 8 source reports
JUNIOR, MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View source