Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Kahn’s algorithm | Topological sort | Course schedule 2 | Leetcode #210

34.7K views on YouTube

This video explains an important programming interview problem which is to find the topological sort of a given graph.In this video,i have explained how to find topological sort using Kahn’s algorithm.This algorithm is based on BFS (Breadth first search) and makes use of QUEUE and an Indegree ARRAY.Topological sort can also be found recursively using DFS (Depth first search) and a STACK which i have explained in my previous video.I have shown all the steps of this algorithm clearly using proper examples and have also shown the solution for a practice problem from leetcode number 210 which is course schedule 2.I have dry run the algorithm and have also explained the code walk through at the end of the video.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 🙂

========================================================================

INSTAGRAM : https://www.instagram.com/surya.pratap.k/

SUPPORT OUR WORK: https://www.patreon.com/techdose

LinkedIn: https://www.linkedin.com/in/surya-pratap-kahar-47bb01168

WEBSITE: https://techdose.co.in/

TELEGRAM Channel LINK: https://t.me/codewithTECHDOSE

TELEGRAM Group LINK: https://t.me/joinchat/SRVOIxWR4sRIVv5eEGI4aQ
=======================================================================

CODE LINK: https://gist.github.com/SuryaPratapK/59310f105db60c4329433d0f429826bb
USEFUL VIDEOS:-
BFS: https://youtu.be/YYq38LTz774
Topological sort | Course schedule 2: https://youtu.be/qe_pQCh09yU