Vidyalelo
Data Structure · Q16

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 16

Q16

What is the primary use of the Depth-First Search (DFS) algorithm in graph theory?

A.
To explore all reachable vertices from a given source node.
B.
To find the shortest path in a weighted graph.
C.
To detect cycles in a graph.
Answer
D.
To perform level-order traversal.

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board