Aspire Faculty ID #12118 · Topic: CUET 2025 · Just now
CUET 2025

Consider the task of finding the shortest path in an unweighted graph by using BFS and DFS. Which of the following statements are true? 
(A). BFS always finds the shortest path. 
(B). DFS always finds the shortest path. 
(C). DFS does not guarantee finding the shortest path. 
(D). BFS does not guarantee finding the shortest path. 

Choose the correct answer from the options given below: 
1. (B) and (D) only 
2. (A) and (C) only 
3. (A) and (B) only 
4. (C) and (D) only

Solution

  • BFS (Breadth First Search) on an unweighted graph always explores level by level.
    ⇒ BFS always finds the shortest path. → (A) True

  • DFS (Depth First Search) explores deeply before backtracking. It can find a path, but not necessarily the shortest one.
    ⇒ DFS does not guarantee shortest path. → (C) True

  • (B) “DFS always finds the shortest path” → ❌ False.

  • (D) “BFS does not guarantee shortest path” → ❌ False.

✅ Correct Answer:

Previous 10 Questions — CUET 2025

Nearest first

Next 10 Questions — CUET 2025

Ascending by ID
Ask Your Question or Put Your Review.

loading...