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
SOLTEKGG
12 minutes agoNo survivors!!
23 watching -
1:02:39
BonginoReport
10 hours agoDemocrats Expose Themselves On Voter ID | Episode 219 - 02/05/26
129K77 -
LIVE
GloryJean
21 minutes agoAnother BIG $,$$$,$$$ Day Today
17 watching -
1:08:22
Chad Prather
15 hours agoBlessed: The Upside-Down Kingdom of Jesus
46.2K30 -
LIVE
Badlands Media
3 hours agoBadlands Daily: 2/5/26
3,371 watching -
20:03
Neil McCoy-Ward
2 hours ago🚨 Near Breaking Point — Calls Grow for More Migrants and Taxes 🔥
11.7K4 -
LIVE
The Mike Schwartz Show
12 hours agoTHE MIKE SCHWARTZ SHOW with DR. MICHAEL J SCHWARTZ 02=05-2026
165 watching -
LIVE
LFA TV
13 hours agoLIVE & BREAKING NEWS! | THURSDAY 2/5/26
2,299 watching -
LIVE
FusedAegisTV
1 day agoKing of Iron Fist RETURNS ● Nintendo Partner Showcase ● Rumble Shorts ● Pushing to Rajin Rank
84 watching -
LIVE
TheGamesMast3r
3 hours ago🥸Kiki Plays -Testing of the Testings!!!
45 watching