Find the Town Judge Visualizer & Step-by-Step Algorithm Solution
Track incoming trust minus outgoing trust for each person, then find the person whose score equals n − 1.
Category: graphs | Difficulty: Easy
Tags: Graph, Array, In-Degree, Out-Degree
TraceDSATrack incoming trust minus outgoing trust for each person, then find the person whose score equals n − 1.
Tags: Graph, Array, In-Degree, Out-Degree
Create score with 3 zeroes. People use indices 1 through 2; index 0 is unused. The judge must finish with score n − 1 = 1.