InterviewSolution
Saved Bookmarks
| 1. |
Depth First Search is equivalent to which of the traversal in the Binary Trees?(a) Pre-order Traversal(b) Post-order Traversal(c) Level-order Traversal(d) In-order TraversalI got this question in final exam.This is a very interesting question from Depth First Search in section Graph Search of Data Structures & Algorithms II |
|
Answer» CORRECT choice is (a) Pre-order Traversal Easy explanation - In Depth First SEARCH, we EXPLORE all the nodes aggressively to ONE path and then BACKTRACK to the node. Hence, it is equivalent to the pre-order traversal of a Binary Tree. |
|