edited by
1,588 views
14 14 votes

The set $\mathbf{T}$ represents various traversals over binary tree. The set $\mathbf{S}$ represents the order of visiting nodes during a traversal.
\[
\renewcommand{\arraystretch}{1.3}
\begin{array}{|l|l|}
\hline
\quad\quad\textbf{T} & \quad\quad\quad\textbf{S} \\
\hline
\text{I: Inorder} & \text{L: left subtree, node, right subtree} \\
\text{II: Preorder} & \text{M: node, left subtree, right subtree} \\
\text{III: Postorder} & \text{N: left subtree, right subtree, node} \\
\hline
\end{array}
\]
Which one of the following is the correct match from $\mathbf{T}$ to $\mathbf{S}$ ?

  1. $\mathrm{I}-\mathrm{L}, \mathrm{II}-\mathrm{M}, \mathrm{III}-\mathrm{N}$
  2. $\mathrm{I}-\mathrm{M}, \mathrm{II}-\mathrm{L}, \mathrm{III}-\mathrm{N}$
  3. $\mathrm{I}-\mathrm{N}, \mathrm{II}-\mathrm{M}, \mathrm{III}-\mathrm{L}$
  4. $\mathrm{I}-\mathrm{L}, \mathrm{II}-\mathrm{N}, \mathrm{III}-\mathrm{M}$

4 Answers

4 4 votes

Do this  question Just by Defniation  of each 

Inorder = Left Subtre, Root Node, Right subtree.

Preorder = Root Node, LeftSubtree, Right Subtree.

Postorder = Left Subtree, Right Subtre, Root Node.

One thing common in all traversal  is that Left Subtre is visted first before Right Subtre.

so option A is correct (direct Matching)

1 1 vote

In the context of tree traversing or simply traversal is the process of visiting every node in the tree exactly once in a specific, systematic order. Unlike linear data structures (like arrays or linked lists), which are usually traversed in a single logical way, trees are hierarchical and can be traversed in several different sequences.

1. Inorder Traversal (L-N-R)

In this method, the left subtree is visited first, followed by the root node, and finally the right subtree.

  • Definition: Left Subtree$\rightarrow$  Root  $\rightarrow$ Right subtree

2. Preorder Traversal (N-L-R)

In this method, the root node is visited first, followed by the left subtree and then the right subtree.

  • Definition: Root $\rightarrow$ left Subtree $\Rightarrow$ right subtree

3. Postorder Traversal (L-R-N)

In this method, we visit the left subtree first, then the right subtree, and finally the root node.

  • Definition: Left Subtree$\rightarrow$ Right Subtree $\rightarrow$ Root

 

$(I-L),(II-M),(III-N)$

moved by
0 0 votes
pre order  : Root , left sub tree, Right sb tree

in order : : left sub tree , Root, Right sub tree

post order : Left sub tree, Right sub tree, Root

 

option  :A is correct   I−L,II−M,III−N
Answer:
Position:
Show:

Related questions

14 14 votes
4 4 answers
2.0k
2.0k views
gatecse asked Feb 23
2,031 views
Consider a stack $S$ and a queue $Q$. Both of them are initially empty and have the capacity to store ten elements each. The elements $1,2,3,4$, and $5$ arrive one by one...
4 4 votes
1 1 answer
771
771 views
GO Classes asked Feb 12
771 views
The following sequence corresponds to the preorder traversal of a BST : $$T: 50, 25, 13, 40, 30, 47, 75, 60, 70, 80, 77$$The position of the element $60$ in the postorder...
2 2 votes
3 3 answers
221
221 views
Shubham Sharma 2 asked Apr 19
221 views
The inorder and preorder traversal of binary tree are $\mathrm{d}, \mathrm{b}, \mathrm{e}, \mathrm{a}, \mathrm{f}, \mathrm{c}, \mathrm{g}$ and $\mathrm{a}, \mathrm{b}, \m...
2 2 votes
1 1 answer
245
245 views
Shubham Sharma 2 asked Sep 10, 2025
245 views
Match the $\textbf{LIST-I}$ with $\textbf{LIST-II}$$\begin{array}{|l|l|l|l|} \hline & \textbf{ LIST-I } & & \textbf{ LIST-II } \\ \hline \text{A.} & \text{Breadth First ...