Which data-structures are used by the search algorithms, dfs and bfs, respectively?
Answers
Answered by
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❤❤❤
KINDLY MARK BRAINLEST❤❤❤
Similar questions
English,
7 months ago
History,
7 months ago
Computer Science,
1 year ago
English,
1 year ago
Math,
1 year ago