- BFS visits nodes level by level.
- Starting from A, visit all its neighbors: B, D, I.
- Next, visit neighbors of B, D, and I that haven't been visited: C, E, G.
- Finally, visit neighbors of C, E, and G that haven't been visited: F, H, J.
- BFS order: A, B, D,
Show more…