Graph algorithms

BFS

Explore the bfs traversal algorithm — watch the visualization trace through each step.

read the article on bfs

breadth-first search

1start234567
currentvisitedin queuealready visited
Queue (front → back)
empty
Visited (in order)
none yet
choose a start node, then press ▶ play or step →
start