Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91ea93f

Browse files
add a solution for 997
1 parentb9a4202 commit91ea93f

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
publicstaticclassSolution2 {
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
publicintfindJudge(intn,int[][]trust) {
3033
if (trust.length <n -1) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp