Expand description
Recursive and iterative depth-first search.
Functionsยง
- dfs_
full - Runs
dfs_recursivefrom every unvisited node, covering all connected components. Returns a single finish-order vec spanning the whole graph. - dfs_
iterative - Runs an iterative depth-first search from
startusing an explicitStack, callingvisitorthe first time each node is discovered. - dfs_
recursive - Runs a recursive depth-first search from
start, callingvisitorthe first time each node is discovered.