Рет қаралды 19,641
This video explains an interesting programming interview question which is to find the judge in the town. The problem says that we have a town with N people, numbered from 1 to N and we are required to find the town judge among those people based on trust criteria which is provided to us. We can solve this problem in many ways but i have shown you one of the best and simplest method for solving this problem using array of pairs. I have explained the intuition for solving this problem and at the end of the video, i have also shown the CODE walk-through for this algorithm. CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: gist.github.co...