Search
⌘K
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:
HubSpot
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid February, 2026
HubSpot
Staff
Mid December, 2025
Junior
Mid November, 2025
HubSpot
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.