1.

What is the space complexity of Depth-first search?(a) O(b)(b) O(bl)(c) O(m)(d) O(bm)

Answer» The correct choice is (d) O(bm)

Easy explanation: O(bm) is the space complexity where b is the branching factor and m is the maximum depth of the search tree.


Discussion

No Comment Found

Related InterviewSolutions