NeetCode #561LC-2924MediumGraphs
← Back to All Problems#561 · #2924 · Find Champion II(找到冠军 II)
📌 Problem Statement & Constraints
There are
n teams numbered 0..n-1 in a tournament. edges[i] = [u, v] means team u is stronger than team v. A team is the champion if it is stronger than every other team, directly or indirectly. Return the champion's number, or -1 if there is none or more than one. Constraints: 1 <= n <= 100, 0 <= edges.length <= n * (n - 1) / 2, the graph is a DAG.🔒
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!