Skip to content

Commit 91ea93f

Browse files
add a solution for 997
1 parent b9a4202 commit 91ea93f

File tree

1 file changed

+3
-0
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-0
lines changed

src/main/java/com/fishercoder/solutions/_997.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public int findJudge(int n, int[][] trust) {
2525
public static class Solution2 {
2626
/**
2727
* Credit: https://leetcode.com/problems/find-the-town-judge/solution/ solution 2
28+
* Also, note: is it possible to have more than one town judges?
29+
* No! It's impossible! If it's possible, suppose there are two town judges, then both of them have to be trusted by everyone else which includes the other judge.
30+
* Otherwise, we'ld have a town judge not trusted by everybody.
2831
*/
2932
public int findJudge(int n, int[][] trust) {
3033
if (trust.length < n - 1) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy