Back to Question

How do you implement Topological Sorting for a Directed Acyclic Graph?

Question Explain

This problem asks to order vertices such that for every directed edge u->v, u comes before v. It tests Kahn's algorithm or DFS.

Start Trying This Question Simulation