Skip to content

Glossary: Coding Interviews in Go

BFS on a grid

Also written: BFS, breadth-first search, pattern 7

A search that uses a queue to visit cells in order of distance from the start. It finds the fewest steps across a grid, such as a route across the warehouse floor.

Where the book teaches it

Related terms

GridQueueIn-bounds checkDFS flood fill