Breadth-first search is an algorithm for searching the nodes of a graph in order by their hop count from a starting node.