Glossary: Data Structures and Algorithms in Rust
Depth-first search (DFS)
Also written: DFS
Exploring a graph by going as deep as possible down one road before backing up to try the next. It finds everything reachable and can be written with recursion or a stack.