Glossary: Data Structures and Algorithms in Go
Breadth-first search (BFS)
Also written: BFS, breadth-first search
Visiting a graph ring by ring from the start, using a queue. Because it reaches each place by the fewest roads first, it finds the route with the fewest stops.
Where the book teaches it
Related terms
Depth-first search (DFS)QueueVisited setcameFrom mapO(V + E)