-
Consider the following graph :
Among the following sequences
1. abeghf 2. abfehg 3. abfhge 4. afghbe
Which are depth first traversals of the above graph?
-
- 1, 2 and 4
- 1 and 4
- 2, 3 and 4
- 1, 3 and 4
- 1, 2 and 4
Correct Option: D
DFS traversal takes the path to the end & then move to other branch.
Hence option (d) is correct.