Skip to content

Glossary: Algorithms Beyond the Basics

BFS (breadth-first search)

Also written: BFS, breadth-first search

A graph search that finds the route with the fewest roads. It is not enough when roads have different driving times, because the route with fewest roads can take longer, so a weighted method such as Dijkstra's algorithm is needed.

Where the book teaches it

Related terms

Dijkstra's algorithmDFS (depth-first search)Weighted graph