Loading
Loading
Explore level by level using a queue. Because nodes are reached in order of distance, the first time BFS touches a node it has arrived by a shortest path.
Use ← → to step, Space to play or pause, and the Input button to run it on your own data.