Depth First Search graph search algorithm uses ______ data structure for its…
2020
Depth First Search graph search algorithm uses ______ data structure for its implementation.
- A.
Stack
- B.
tree
- C.
Dequeue
- D.
Queue
Attempted by 484 students.
Show answer & explanation
Correct answer: A
The correct answer is A: Stack. Depth First Search (DFS) explores a graph by going as deep as possible along each branch before backtracking. This Last-In, First-Out (LIFO) behavior is inherently managed using a Stack data structure (either explicitly or implicitly via recursion).