CPKit
v1.6.1

Grid BFS Traversal

Grid SearchMedium

Visualize unweighted grid pathfinding layer-by-layer using FIFO queues.

Alt+Shift+B

Configuration Panel

Click on cells in the visualizer grid to build walls (obstacles) then click run to trace the shortest path.

Interactive Grid Visualizer

S
T
Start Target Wall Visited Path

Complexity Indices

Time ComplexityO(R * C)
Auxiliary SpaceO(R * C) queue and visited tables
Conceptual Overview

Grid BFS uses a FIFO queue to traverse cells layer-by-layer, guaranteeing the shortest path in unweighted grids.

Source: CP-Algorithms reference guide