The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal.
$$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\,\, \text { S } \\ \text { I: } \text { Inorder } & \text { L: left subtree, node, right subtree } \\ \text { II: } \text { Preorder } & \text { M: node, left subtree, right subtree } \\ \text { III: } \text { Postorder } & \text { N: left subtree, right subtree, node } \end{array} $$
Which one of the following is the correct match from $T$ to $S$ ?
Let $n$ be an odd number greater than 100 . Consider a binary minheap with $n$ elements stored in an array $P$ whose index starts from 1. Which of the following indices of $P$ do/does NOT correspond to any leaf node of the minheap?
The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of a full binary tree with 23 nodes is $\_\_\_\_$ . (answer in integer)
Consider a binary tree $T$ in which every node has either zero or two children. Let $n>0$ be the number of nodes in $T$. Which ONE of the following is the number of nodes in $T$ that have exactly two children?
GATE CSE Subjects
Browse all chapters by subject