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
############
-
2:10:12
Side Scrollers Podcast
4 hours agoMAJOR Hasan Allegations + Arc Raiders Review CONTROVERSY + Craig TRENDS on X + More | Side Scrollers
10.5K5 -
5:43
Buddy Brown
3 hours ago $2.05 earnedThere's a List of WEF's "Post Trump" Predictions GOING VIRAL! | Buddy Brown
3.35K12 -
1:02:24
Timcast
3 hours agoBerkeley Goes BALLISTIC Over TPUSA Event, Massive BRAWL ERUPTS
145K110 -
LIVE
StoneMountain64
2 hours agoBattlefield REDSEC $100k TOURNAMENT
141 watching -
DVR
Daniel Davis Deep Dive
6 hours agoRussia's Doomsday Weapon /MIT Prof. Ted Postol
4.15K -
2:12:10
Steven Crowder
6 hours ago🔴Is This Really MAGA: What the Hell Is Donald Trump Doing?
410K506 -
1:03:36
The Rubin Report
4 hours agoCNN Panel Looks Angry as Republican Points Out How Dems Shutdown Backfired
40.2K51 -
1:11:36
Sean Unpaved
3 hours agoBen Johnson Has Caleb Williams Playing Best Football Of His Career! | UNPAVED
15K1 -
3:11:24
Right Side Broadcasting Network
6 hours agoLIVE REPLAY: President Trump’s Veterans Day Wreath Laying Ceremony and Address - 11/11/25
70.3K18 -
18:09
Professor Nez
4 hours ago🚨🔥HOLY MACKEREL! Chuck Schumer FLEES the Senate Floor when CONFRONTED on Obamacare FRAUD!
32.4K26