Back to Questions

Find the Town Judge (Array/Map)

131.5K viewsAsked at LinkedIn
Easy

Question Explain

In a town of $N$ people, the judge trusts nobody and is trusted by everyone. Find the judge by tracking in-degrees (trusted by) and out-degrees (trusts) using an array or map.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question