What is a disadvantage of using BFS?

Practice Questions

1 question
Q1
What is a disadvantage of using BFS?
  1. It can be slower than DFS
  2. It requires more memory than DFS
  3. It cannot be used for cyclic graphs
  4. It is not suitable for unweighted graphs

Questions & Step-by-step Solutions

1 item
Q
Q: What is a disadvantage of using BFS?
Solution: BFS requires more memory than DFS because it stores all nodes at the current level in a queue, which can grow large in wide graphs.
Steps: 0

Related Questions

Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely