/topsort

Topological Sort. DFS traversal. infoarena

Primary LanguageC++

Topological Sort

In computer science, a topological sort of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex v, u come before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed and the edges may represent constraints that one task must be performed before another.

Practice: