What are the advantages of breadth-first search (BFS) over depth-first search (DFS)?
  • BFS is complete and optimal, while DFS is not guaranteed to halt when there are loops.

Valid HTML 4.0 Transitional