TopologicalSort

TopologicalSort[g]
gives a permutation of the vertices of the directed acyclic graph such that an edge implies that vertex appears before vertex .

DetailsDetails

New to Mathematica? Find your learning path »
Have a question? Ask support »