Question:

Which of the following is not an application of DFS?

Show Hint

Use BFS for finding the shortest path in unweighted graphs, as it explores all nodes at the present depth level before moving on to the next level.
Updated On: Sep 25, 2025
  • Topological Sort
  • Determining Strongly Connected Components in a graph
  • Finding minimum distance to a node in an unweighted graph optimally
  • Solving Maze Problem
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation


 

Step 1: DFS Applications. 
- **Topological Sort**: DFS is used to generate a topological ordering of vertices in a Directed Acyclic Graph (DAG). 

- **Determining Strongly Connected Components (SCCs)**: DFS can be used in algorithms like Kosaraju's algorithm to identify strongly connected components in a graph. 

- **Solving Maze Problem**: DFS is often applied to explore a maze by visiting each possible path and backtracking when necessary. 
 

Step 2: Incorrect Application. 
- **Finding minimum distance to a node in an unweighted graph optimally**: This task is usually solved using **Breadth-First Search (BFS)**, not DFS. BFS explores the graph level by level, ensuring the shortest path in an unweighted graph. 
 

Step 3: Conclusion. 
The correct answer is **(3) Finding minimum distance to a node in an unweighted graph optimally**. 
 

Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions