Dag

There's a total of 1 articles.




Topological sorting of a graph

Topological sorting of a graph

Topological sorting is a linear ordering of the vertices of a directed acyclic graph (DAG) such that for every directed edge (u, v), vertex u comes before vertex v in the ordering. In other words, it is a way to order the vertices of a DAG such that there are no directed cycles.


In this article I implement the topological sorting algorithm as well as an example of how to use it to find the shortest path in a directed acyclic graph.
Me
Published on Wed, Jun 24, 2015
Last modified on Sun, Jun 16, 2024
410 words - Page Source