Skip to content

Glossary: Algorithms Beyond the Basics in Rust

DFS (depth-first search)

Also written: depth-first search, DFS

A graph search that follows one path as deep as it can before backing up to try another. Backtracking walks its choice tree this way, and it can also be used to put tasks in topological order.

Where the book teaches it

Related terms

BacktrackingBFS (breadth-first search)Topological order