Reputation: 103
probably this question was asked before, however, I am not sure how I can calculate the space complexity of DFS. for example in this situation, branching factor(b) is 3 and depth(d) is 5 and each node requires 10 bytes of memory to represent. how can I calculate the space complexity ?
Upvotes: 1
Views: 1779
Reputation: 7457
It depends over what kind of structure you perform the depth first search (DFS):
Upvotes: 1