[Java] Topological Sort Algorithm | Solve Course Schedule I & II

preview_player
Показать описание
In this video, I'm going to show you how to use Topological sort (Kahn's Algorithm) to solve two Leetcode problems - Course Schedule I & II.

Here’s a quick rundown of what you’re about to learn:

(0:00​​) Intro
(10:20) Leetcode 207 Course Schedule
(31:25​​) Leetcode 210 Course Schedule II

In the end, you’ll have a really good understanding on Topological sort and questions that are similar to Topological sort.

Рекомендации по теме
Комментарии
Автор

I understand that the videos are long, but having made it all the way to the end, a bit more depth on the topic, in terms of the code, would be nice before just cutting the video off. You spend a lot of time addressing things at a high level, but relatively little working through the actual code.

DriveBreakFixRepeat
Автор

why do you use Hashset here? can we use queue instead? because set is not good for keeping order.

Sophia-fwrm