Find Champion In DAG With Unique Winner
Find Champion II: Given a DAG with n teams and edges, return the unique champion team if it exists, otherwise -1.
2924. Find Champion II Difficulty: Medium Topics: Graph There are n teams numbered from 0 to n - 1 in a tournament; each team is also a node in a DAG. You are given the integer n and a 0-indexed 2D integer array edges of length m representing the DAG, where >dges[i] = [ui, vi] indicates that there is a directed edge from team ui to team vi in the graph. A directed edge from a to b in the graph means that team a is stronger than team b and team b is weaker than team a. Team a will be the champion of the tournament if there is no team b that is stronger than team a. Return the team that will be...
