Breadth-First Search Animator

Enter up to 12 nodes. In the Connections column, list neighboring nodes separated by commas. For BFS, distance is the number of edges from the starting node.

Graph Data

NodeConnectionsDistance

Queue

Queue: empty

Status

Enter a graph or load the example.
Undiscovered
In queue
Current
Finished

Connections are treated as undirected. If A lists B, the program automatically creates the connection in both directions.

Animation