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
############
-
13:05
Mike Rowe
1 day agoIs College DEAD? Inside America’s #1 Trade School | Sheree Utash From #448 | The Way I Heard It
5.52K6 -
LIVE
Times Now World
2 days agoWorld News LIVE | Maduro Dares Trump, Says China Is Now World’s Top Power Not US
172 watching -
1:39:58
Gary Cardone
2 hours ago $0.45 earnedLIVE With Gary Cardone
1.19K -
LIVE
Major League Fishing
3 days agoLIVE Tackle Warehouse Invitationals Championship, Day 3
179 watching -
2:15:06
Game On!
19 hours ago $20.32 earnedNFL Week 1 Wise Guy Round Table BEST BETS!
113K2 -
4:08:14
EXPBLESS
4 hours agoNew Game + On Elden Ring 🔥JOIN UP
8.17K -
12:11
Nikko Ortiz
1 day agoCrashout 6 Rumble
61K8 -
LIVE
Midnight In The Mountains
6 hours agoGaming w/ PER·SE·VER·ANCE | Sunday Funday Split Screen Gameplay BL3
109 watching -
24:39
GritsGG
20 hours agoINSANE Ranked Game on Warzone!
42.9K3 -
LIVE
MrR4ger
1 day agoTHE HELL IS THIS? - HELL IS US / PSYOP SUNDAY LETS WORSHIP THE DEVIL TOGETER
71 watching