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
############
-
5:44:49
Redacted News
7 hours agoTurning the Tide: 9/11 Justice in 2025 — Day 1 with Sen. Ron Johnson, Richard Gage and More
139K58 -
2:48:00
TheSaltyCracker
4 hours agoYou're Being Hunted ReeEEStream 9-10-25
206K457 -
LIVE
LFA TV
18 hours agoBREAKING: CHARLIE KIRK ASSASSINATED - WEDNESDAY 9/10/25
1,101 watching -
1:31:08
I_Came_With_Fire_Podcast
4 hours agoCheck Fire: God Bless Charlie Kirk
37.7K16 -
1:13:35
Glenn Greenwald
6 hours agoCharlie Kirk Assassinated; NATO Alleges Russian Drones Flew Over Poland, and More | SYSTEM UPDATE #512
232K261 -
1:46:28
Badlands Media
20 hours agoAltered State S3 Ep. 45
104K11 -
8:56:53
Dr Disrespect
13 hours ago🔴LIVE - DR DISRESPECT - THE FINALS - NEW SEASON 8 LAUNCH EVENT W/ THE SHOTTY BOYS
247K8 -
LIVE
RealAmericasVoice
3 days agoHOME OF REAL NEWS
4,520 watching -
27:00
BonginoReport
7 hours agoRest In Peace Charlie Kirk - Nightly Scroll w/ Hayley Caronia (Ep.131) - 09/10/2025
235K366 -
1:20:06
Kim Iversen
8 hours agoRIP Charlie Kirk: When Words Fail, They Reach for Guns
167K273