Function ADS::longestPath

Function Documentation

inline std::optional<Nodes> ADS::longestPath(const Adjacency &G, int r, int t, int k)

a simple path from r to t of at least k edges, by backtrack

Pre:

G is square, r and t are nodes

Post:

a path returned is simple, from r to t, of at least k edges