Consider the following graph:
Among the following sequences:
Which are the depth-first traversals of the above graph?
Answer will be (D)
DFS goes upto how much depth possible and then backtrack and go to the next link.
Here only 'abfehg' not possible because e and h consecutively is not possible by any backtracking of DFS traversal
Correct Answer : (D)
64.3k questions
77.9k answers
244k comments
80.0k users