Breadth-first search: worst-case complexity in a tree with branching factor b and shallowest goal depth d Time complexity In the worst case, all nodes up to depth d, and some nodes at depth (d + 1) are generated. O(bd+1 ) Space complexity Same as the time complexity, because BFS maintains information (Parent[]) of all generated nodes on memory. Hence O(b d+1 ) 18 / 76
© Copyright 2026 Paperzz