> For the complete documentation index, see [llms.txt](https://hanfak.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hanfak.gitbook.io/workspace/computer-science/algorithms/bfs.md).

# Breadth Firth Search

## Uses

* find the shortest path between two nodes in a graph.
* have knowledge that a solution is not far from the root of a tree.
* prioritize searching vertices that are close to the start node.
* visit sibling nodes before child nodes.
