Find the Town Judge at Arista Networks
Easy50.5% acceptance
This problem has 100.0% frequency at Arista Networks.
Problem Description
In a town, there are `n` people labeled from `1` to `n`. There is a rumor that one of these people is secretly the town judge. If the town judge exists, then: 1. The town judge trusts nobody. 2. Everybody (except for the town judge) trusts the town judge. 3. There is exactly one person that...
Read full problem and hintsTopics
Also asked at 6 companies
More Arista Networks Questions
Construct String With Repeat LimitMediumContains Duplicate IIEasyMissing NumberEasyCourse Schedule IIMediumCopy List with Random PointerMedium
View all Arista Networks questions