Recent questions tagged tree-traversal

2 2 votes
1 1 answer
190
190 views
The following keys are inserted into an empty Binary Search Tree in the given order:$\texttt{70, 11, 47, 81, 20, 61, 10, 12, 13, 62}$ What is the postorder traversal of t...
4 4 votes
2 2 answers
316
316 views
The postorder traversal of a binary search tree is:$\text{1, 12, 4, 22, 18, 16}$What is the new postorder traversal after inserting $10$ and $14$ into the BST?$\text{1, 1...
6 6 votes
1 1 answer
254
254 views
A binary tree has:Left subtree containing $1000$ nodes Right subtree containing $100$ nodesHow many nodes are processed before the root in preorder, inorder, and postorde...
5 5 votes
2 2 answers
252
252 views
A binary tree has the following traversals:Preorder traversal $: \text{A M P K L D H T}$ Inorder traversal $:\text{P M L K A H T D}$Which of the following is the postorde...
6 6 votes
1 1 answer
215
215 views
Consider the following binary tree:Which option correctly gives the preorder, postorder, inorder, and level-order traversals?Preorder $:\texttt{9 15 23 12 8 6 2 7 10 5 35...
6 6 votes
1 1 answer
193
193 views
Consider the following binary search tree:If we traverse the tree in postorder and print only the key values that are greater than $12$ and less than $20$, what will be t...
2 2 votes
3 3 answers
250
250 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...
4 4 votes
2 2 answers
556
556 views
You are given the following Pre-order and In-order traversals of a Binary Tree $T$ with nodes $E, F, G, P, Q, R, S$.\[\begin{array}{llllllll}\text{Pre-order:} & P & Q & S...
13 13 votes
4 4 answers
1.9k
1.9k views
The set $\mathbf{T}$ represents various traversals over binary tree. The set $\mathbf{S}$ represents the order of visiting nodes during a traversal.\[\renewcommand{\array...
4 4 votes
1 1 answer
868
868 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...
1 1 vote
1 1 answer
210
210 views
When a tree given in the diagram is traversed inorder, the order would be$\text{a, b, d, h, e, i, j, c, f, g, k}$$\text{h, d, i, j, e, b, f, k, g, c, a}$$\text{h, d, b, i...
2 2 votes
1 1 answer
286
286 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 ...
1 1 vote
1 1 answer
616
616 views
If the prefix traversal order of a tree is $*+\mathbf{a} \mathbf{b}-\mathbf{c} \mathbf{d}$. Then, find the equivalent postfix order of the that tree.
1 1 vote
2 2 answers
972
972 views
Consider the traversal of a treePreorder $\rightarrow$ $\text{ABCEIFJDGHKL}$Inorder $\rightarrow$ $\text{EICFJBGDKHLA}$Which of the following is correct post order traver...