18/32
Part 4 of 7 · Depth firstWatch
Watch · 15 min

Course Schedule II solved the depth-first way, walking from each course to its prerequisites, with one set for the courses on the current path and one for the courses already done, the ACTIVE and DONE states of this section. The drawing starts here and the code at 10:40.

Course Schedule II - Topological Sort - Leetcode 210 · NeetCode · Jan 2021YouTube