Skip to main content

dfs

Function dfs 

Source
pub fn dfs(
    graph: &HashMap<String, Vec<String>>,
    start: &str,
) -> Result<Vec<String>, Error>
Expand description

Depth-first search.

Every neighbor listed in the adjacency map must also be a key of the map; missing keys return Err(Error::InvalidGraph).