The set represents various traversals over binary tree. The set represents the order of visiting nodes during a traversal.
Which one of the following is the correct match from to ?
View worked solution
Answer: A
In binary tree traversals, the naming (Pre, In, Post) refers to the position of the current node relative to its left subtree and right subtree:
- Inorder (I): The node is visited in-between the left and right subtrees.
This matches L. - Preorder (II): The node is visited before (pre) the left and right subtrees.
This matches M. - Postorder (III): The node is visited after (post) the left and right subtrees.
This matches N.
Therefore, the correct matching is , which corresponds to option A.
Free practice · Your answers on this page are not saved.
