1.

Breadth 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 have been asked this question during a job interview.Question is from Breadth First Search topic in chapter Graph Search of Data Structures & Algorithms II

Answer»

The correct CHOICE is (c) Level-order Traversal

Explanation: The Breadth First Search Algorithm SEARCHES the nodes on the basis of level. It TAKES a node (level 0), explores it’s NEIGHBORS (level 1) and so on.



Discussion

No Comment Found

Related InterviewSolutions