Continue learning
Practice related DSA questions in the same topic.
Launch modules in prerequisite order in a network of dependencies.
Select any module with no unfinished incoming dependencies. The arrows point from prerequisite to dependent.
Edges: M4 → M1 · M4 → M3 · M3 → M2
Step 0 · Launch every module after its prerequisites.
Kahn’s topological sort removes zero-indegree vertices. With adjacency lists and a queue it costs O(V + E).
Play this game