> For the complete documentation index, see [llms.txt](https://haroldyin.gitbook.io/grokking-algorithm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://haroldyin.gitbook.io/grokking-algorithm/chapter-6-breadth-first-search.md).

# Chapter 6: Breadth-first Search

*breadth-first search* can slove the *shortest-path problem*.

* **What is a graph**？A graph models a set of connections.
* Refer to LinkedIn,o you need to search people in the order that they’re added. There’s a data structure for this: it’s called *a queue*.
  * First In First Out
