Template Function ADS::topsort

Function Documentation

template<Graph G>
std::vector<int> ADS::topsort(const G &g)

topsort(): the nodes by decreasing finish time, which for an acyclic graph is a topological order; the first is the top of the stack of the book

Post:

a topological order if the graph is acyclic (audit)