Open In App

Data Structures | Tree Traversals | Question 7

Which traversal of tree resembles the breadth first search of the graph?
(A) Preorder
(B) Inorder
(C) Postorder
(D) Level order

Answer: (D)
Explanation: Breadth first search visits all the neighbors first and then deepens into each neighbor one by one. The level order traversal of the tree also visits nodes on the current level and then goes to the next level.
Quiz of this Question

Article Tags :