Data structures · Graphs

Breadth-first search

A search that spreads out from the start one ring at a time needs a queue, and a record of what it has already found.