Computer Science, asked by kausthub138, 1 year ago

Which data-structures are used by the search algorithms, dfs and bfs, respectively?

Answers

Answered by Silvershades02
5
BFS uses always queue, Dfs uses Stack data structure. As the earlier explanation tell about DFS is using backtracking. Remember backtracking can proceed only by Stack. The depth-first search uses a Stack to remember where it should go when it reaches a dead end.

KINDLY MARK BRAINLEST❤❤❤
Similar questions