Pathfinding Visualizer

Visualize how algorithms navigate from point A to point B.
Select Start, End, and draw Walls.

GRID_VIEW_01

Breadth-First Search (BFS)

Description

Explores nodes level by level starting from the source. It guarantees the shortest path in an unweighted grid.

Simply Explained

"Imagine dropping a pebble into a calm pond. The ripples spread out in a perfect circle, reaching everything close to the center first, then moving further and further out. BFS works the same way—it checks every spot 1 step away, then every spot 2 steps away, ensuring it finds the closest path first."

Time Complexity

O(V + E)

Space Complexity

O(V)