Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions



1. A BFS searches every single solution in a graph to expand its nodes; a DFS burrows deep within a child node until a goal is reached.

2. The features of a BFS are space and time complexity, completeness, proof of completeness, and optimality; the most natural output for a DFS is a spanning tree with three classes: forward edges, back edges, and cross edges.

0 0 0
1. In BFS the root node is expanded first, then all the successors of the root node are expanded, and in next step all the successors of every node are expanded, the process continues till the goal is achived.               while
In DFS we explore the root node and traverse as far as possible from the root node untill the goal is achived.

2.In BFS the space complexity is more critical as compared to time complexity.                                                                                               while
In DFS has lesser space complexity, because at a time it needs to store only single path from the root to leaf node.

3.Breadth First Search can be done with the help of queue i.e, FIFO(First In First Out)                                                                                                 while
Depth First Search can be done with the help of stack i.e. LIFO(Last In First Out).

4.BFS is slower than DFS                                                                     while
DFS is more faster than BFS.

5.BFS requires more memory compare to DFS                               while
DFS require less memory compare to BFS.

6.BFS is useful in finding shortest path                                              while
DFS in not so useful in finding shortest path.
0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts