1.

Which of the following graph traversals closely imitates level order traversal of a binary tree?(a) Depth First Search(b) Breadth First Search(c) Depth & Breadth First Search(d) Binary SearchThis intriguing question comes from Inorder Traversal in portion Binary Trees of Data Structures & Algorithms II got this question by my college professor while I was bunking the class.

Answer» CORRECT option is (b) Breadth FIRST Search

Best explanation: Both level order tree traversal and breadth first GRAPH traversal follow the principle that VISIT your NEIGHBORS first and then move on to further nodes.


Discussion

No Comment Found

Related InterviewSolutions