NeetCode #622LC-2092HardGraphs
← Back to All Problems

#622 · #2092 · Find All People With Secret(找出知晓秘密的所有专家)

📌 Problem Statement & Constraints

You are given n people, meetings where meetings[i] = [x, y, time] means persons x and y meet at that time, and firstPerson. Person 0 knows the secret from the start and shares it with firstPerson at time 0. A person who knows the secret shares it at every meeting they attend. Return all people who know the secret. Constraints: 2 <= n <= 10^5, 1 <= meetings.length <= 10^5, times are distinct per pair.
🔒

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!