TopologicalSort

TopologicalSort[g]
gives a list of vertices of g in topologically sorted order for a directed acyclic graph g.

DetailsDetails

  • A list of vertices is topologically sorted if u precedes v for each edge .
Introduced in 2010
(8.0)