Glossary: Data Structures and Algorithms in JavaScript
Breadth-first search (BFS)
Also written: BFS, breadth-first search
A graph search that visits the start, then its neighbors, then their neighbors, ring by ring, using a queue. Because it reaches places in rings, it finds the route with the fewest stops.