Question: Which of the following scenarios is BFS preferred over DFS?
Options:
Correct Answer: Finding the shortest path in an unweighted graph
Solution:
BFS is preferred for finding the shortest path in an unweighted graph because it explores all nodes at the present depth before moving deeper.