what is the basic difference between DFS and BFS algorithm. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

what is the basic difference between DFS and BFS algorithm.

29th Apr 2021, 9:05 AM
mustafa raza
mustafa raza - avatar
2 Answers
+ 2
mustafa raza DFS, stands for Depth First Search. BFS uses Queue to find the shortest path. DFS uses Stack to find the shortest path. BFS is better when target is closer to Source https://www.tutorialspoint.com/difference-between-bfs-and-dfs#:~:text=DFS%2C%20stands%20for%20Depth%20First%20Search.&text=BFS%20uses%20Queue%20to%20find,to%20find%20the%20shortest%20path.&text=BFS%20is%20better%20when%20target%20is%20closer%20to%20Source.
30th Apr 2021, 7:29 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
Martin Taylor but i mentioned algorithm there
29th Apr 2021, 6:36 PM
mustafa raza
mustafa raza - avatar