Consider the following sequences of nodes for the undirected graph shown…
GATE · 2008 · IT
Consider the following sequences of nodes for the undirected graph shown below:

a b e f d g c
a b e f c g d
a d g e b c f
a d b c g e f
A Depth First Search (DFS) is started at node a. The nodes are listed in the order they are first visited. Which of the above can be produced as DFS outputs?
- A.
1 and 3 only
- B.
2 and 3 only
- C.
2, 3 and 4 only
- D.
1, 2, and 3
Attempted by 229 students.
Show answer
Correct answer: B
The worked solution is available to enrolled students.
Video solution available to enrolled students.
Explore the full course: Iocl Engineers Officers Grade A Paper 2
Loading lesson…