Differentiate BFS and DFS.
4 years ago
Data Structure and Algorithm
|
No. |
DFS |
BFS |
|
1. |
Backtracking is possible from a dead end |
Backtracking is not possible |
|
2. |
Vertices from which exploration is incomplete are processed in a |
The vertices to be explored are organized as a |
|
3. |
Search is done in one particular direction |
The vertices in the same level are maintained |
Sanisha Maharjan
Jan 23, 2022