Skip to content

Glossary: Algorithms Beyond the Basics

DFS (depth-first search)

Also written: DFS, depth-first search, depth first

A graph search that follows one path as far as it can before backing up. A backtracking search walks its choice tree this way.

Where the book teaches it

Related terms

BFS (breadth-first search)Backtracking