In graph traversal, which method explores as far along each branch before backtracking?
23 views
- Breadth-First Search
- Depth-First Search (Correct Answer)
- Dijkstra’s Algorithm
- Bellman-Ford Algorithm
Explanation
Depth-First Search (DFS) explores a graph by following one branch to its maximum depth before backtracking, using a stack (or recursion) and is useful in topological sorting and cycle detection.