NeetCode #604LC-277MediumGraphsNC Algo100
← Back to All Problems#604 · #277 · Find the Celebrity(搜寻名人)
📌 Problem Statement & Constraints
This is an interactive problem. In a party of
n people, a celebrity is known by everyone else but knows nobody. Given knows(a, b) returning whether a knows b, find the celebrity's label or -1. Constraints: 1 <= n <= 100; at most 3n calls to knows.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!