Course Schedule II | Leetcode 210 | Live coding session 🔥🔥🔥 | Topological Sort nailed !!!!

preview_player
Показать описание
Here is the solution to "Course Schedule II" leetcode question. Hope you have a great time going through it.

1) 0:00 Explaining the problem out loud
2) 1:50 Algorithm walkthrough
3) 10:00 Coding

🔥🔥🔥🔥👇👇👇 For discussion/feedback/humour/doubts/new openings

🔴 Checkout the series: 🔥🔥🔥

🔥🔥🔥 Leetcode Monthly Contest Playlist

PS : Please increase the speed to 1.25X
Рекомендации по теме
Комментарии
Автор

Excellent Explanation Bro . Thank you so much

darwinanirudh
Автор

Did not skip todays leetcode challenge due to your explanation. The check for the indegree == 0 is not needed after poping from the queue as it would have only zero elements. Thanks your great.

myvinbarboza
Автор

I want to say a BIG thank you - I have been able to learn a lot from your videos.

A small input from my side : I think the example for the negative scenario is not correct. If numCourses = 7 and prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2]], it means the vertices 0, 4, 5, 6 have indegree 0. The negative scenario would happen when there is a cycle due to which all the courses can never be completed (i.e., indegree to some vertices can never be 0). For example, numCourses = 3, prerequisites = [[1, 0], [0, 2], [2, 1]] or numCourses = 4, prerequisites = [[1, 0], [2, 1], [1, 3], [3, 2]].

debaratimajumder
Автор

Thanks for the great and crystal clear explanation.

ChandraShekhar-bycd
Автор

Great explanation, I understood topological sort easily! Thanks

premraja
Автор

I think these type of questions should be in all the daily challenges to introduce us with new topics. I got introduced to check cycle and topological sorting from this question only. Ek teer se teen nishaane.

vk-vzqo
Автор

Nice Explanation Sanchit. Your daily solutions helping us a lot in mastering DS and Algo's. Please keep doing the good work dear.Really Thanks a lot to you~~ !!

ravindermaan
welcome to shbcf.ru