pub fn dfs_order(graph: &[Vec<usize>], source: usize) -> Vec<usize>Expand description
Return the DFS visitation order starting from source.
Iterative implementation using an explicit stack, so it is safe for graphs deeper than the default Rust stack limit.
ยงPanics
Panics if source >= graph.len().