What is the advantage of DFS over BFS?
  • If m is the maximum path length and b is the branching factor, the space complexity for DFS is mb while for BFS it is b^m.

Valid HTML 4.0 Transitional