Skip to content

Glossary: Data Structures and Algorithms in Rust

Breadth-first search (BFS)

Also written: BFS

Visiting a graph ring by ring from the start using a queue and a visited set. It reaches each place by the fewest roads, so it finds the fewest-stop route.

Where the book teaches it

Related terms

Depth-first search (DFS)Queuevisited setcame_from