Examveda

What is the primary difference between BFS and DFS?

A. BFS is used for weighted graphs; DFS is not.

B. BFS explores nodes level by level; DFS explores nodes deeply first.

C. BFS uses recursion, DFS does not.

D. BFS is used for weighted graphs; DFS is not.

Answer: Option B


Join The Discussion

Related Questions on Graph Algorithms (DFS, BFS, Dijkstras, etc)