Back to Question
Find the Town Judge (Graph representation)
Question Explain
In a town of $N$ people, the judge is trusted by everyone else and trusts no one. Model the 'trusts' relationship as a graph and find the judge's node in $O(N)$ time.
Start Trying This Question Simulation
Click "Start Speaking" and answer the question naturally.