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
############
-
53:15
The Heidi St. John Podcast
1 day agoHormones, Healing, and Common-Sense Medicine with Drs Mark Michele Sherwood
1.41K2 -
27:38
The Bryce Eddy Show
4 days agoMark Aramian: He Named Him Adam
5.67K -
6:27
GreenMan Studio
13 hours agoTHE RUMBLE COLLAB SHOW Ep. 15 w/ GreenMan Reports
1.86K9 -
25:33
marcushouse
23 hours ago $24.85 earnedDid SpaceX’s Starship Version 3 Pass Its First Big Test?
153K19 -
15:23
Sideserf Cake Studio
22 hours ago $1.11 earnedI Tried to Make a functional Rubik's Cube Cake.
14.3K13 -
6:59:51
Rallied
12 hours ago $11.88 earnedSolo Challenges + High Vibrations
116K6 -
3:13:39
BlackDiamondGunsandGear
9 hours agoAfter Hours Armory / Customer Story Time
27.9K4 -
2:00:29
Badlands Media
1 day agoDevolution Power Hour Ep. 430: Psyops, Distractions, and Reading the Week Between the Lines
138K36 -
10:39:33
GritsGG
17 hours ago#1 Warzone Victory Leaderboard 1280+ Ws!!🔥
67.9K6 -
4:32:12
Akademiks
10 hours agoNothing is Real! J Cole album FULL breakdown! Drake & Kendrick otw? 50 cent unleases on TI n JAY Z
117K11