Premium Only Content
Leetcode solving: 997. Find the Town Judge
Leetcode solving: 997. Find the Town Judge
Please subscribe to my channel
In a town, there are n people labelled from 1 to n. There is a rumor that one of these people is secretly the town judge.
If the town judge exists, then:
The town judge trusts nobody.
Everybody (except for the town judge) trusts the town judge.
There is exactly one person that satisfies properties 1 and 2.
You are given trust, an array of pairs trust[i] = [a, b] representing that the person labelled a trusts the person labelled b.
If the town judge exists and can be identified, return the label of the town judge. Otherwise, return -1.
##############
My other Leetcode solving videos (easy)
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4oUpNyWU_0rOItlScu1_d
Leetcode solving videos (Medium):
https://www.youtube.com/playlist?list=PLg9w7tItBlZvMGxy-y1eXURPD6Ao6kkzA
Leetcode solving videos (Hard):
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4JQmlkGD3M5idZn14NyL6
############
-
LIVE
Sgt Wilky Plays
2 hours agoFirst Run of Black Ops 7 after the Beta | Multiplayer
464 watching -
6:49
The Car Guy Online
11 hours ago $6.72 earned2025–2026 Duramax FAILURES Begin! GM’s NEW Engine Nightmare? Silverado, Sierra, Yukon...
12K18 -
LIVE
Boxin
2 hours agoKingdom Hearts! This is Halloween Town!
130 watching -
8:34
Millionaire Mentor
18 hours agoTrump FIRES BACK After Mamdani’s SHOCKING Threat To New York City
23.4K18 -
LIVE
EXPBLESS
2 hours agoThis Might Be The Last Game I Ever Play | 🔴ARC RAIDERS SOLO RAIDS 🔴
112 watching -
LIVE
IamNibz
2 days ago $0.32 earnedPansy Umbrellas And Buff Emo Horse- WHERE WINDS MEET! (Ft. Diony)
45 watching -
53:56
ZeeeMedia
21 hours agoSilicon Valley, Transhumanists & the Book of Revelation ft. Jay Dyer | Daily Pulse Ep 144
15.8K13 -
1:02:02
A Cigar Hustlers Podcast Every Day
1 day agoEpisode 4 Hustler Every Day Target 10/4, No More Pennies and Gronk Is The Man
15K1 -
3:07
GreenMan Studio
1 day agoHOW TO NOT SELL OUT IN 2025 W/Greeman Reports
13.8K6 -
0:43
WildCreatures
2 days ago $5.69 earnedDiver is swallowed up by a passing bait ball at Darwin Island
15.7K4