1
GATE CSE 2026 Set 2
MCQ (Single Correct Answer)
+1
-0

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$ ?

A

$\mathrm{I}-\mathrm{L}$, $\mathrm{II}-\mathrm{M}$, III -N

B

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

C

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

D

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

2
GATE CSE 2026 Set 2
Numerical
+1
-0

The keys $5,28,19,15,26,33,12,17,10$ are inserted into a hash table using the hash function $h(k)=k \bmod 9$. The collisions are resolved by chaining. After all the keys are inserted, the length of the longest chain is $\_\_\_\_$ . (answer in integer)

Your input ____
3
GATE CSE 2026 Set 2
MCQ (Single Correct Answer)
+2
-0

Let $G$ be a weighted directed acyclic graph with $m$ edges and $n$ vertices. Given $G$ and a source vertex $s$ in $G$, which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from $s$ to all vertices that are reachable from $s$ in $G$ ?

A

$\theta(m+n)$

B

$\theta(m+n \log (n))$

C

$\theta(n m)$

D

$\theta\left(n^3\right)$

4
GATE CSE 2026 Set 2
MCQ (More than One Correct Answer)
+2
-0

Consider a binary search tree (BST) with $n$ leaf nodes ( $n>0$ ). Given any node $V$, the key present in the node is denoted as $\operatorname{Val}(V)$. All the keys present in the given BST are distinct. The keys belong to the set of real numbers.

For a node $V$, let $\operatorname{Suc}(V)$ denote the node that is its inorder successor. If a node $V$ does not have an inorder successor, then $\operatorname{Suc}(V)$ is NULL. As there are no duplicates, if $\operatorname{Suc}(V)$ is not NULL, then $\operatorname{Val}(V)<\operatorname{Val}(\operatorname{Suc}(V))$.

Corresponding to every leaf node $L_i$ that has a non-NULL $\operatorname{Suc}\left(L_i\right)$, a new key $k_i$ with the following property is to be inserted into the BST.

$$ \operatorname{Val}\left(L_i\right) < k_i < \operatorname{Val}\left(\operatorname{Suc}\left(L_i\right)\right) $$

Let $K$ represent the list of all such new keys to be inserted into the BST.

Which of the following statements is/are true?

A

$K$ cannot have any duplicates

B

$K$ will have at least one element

C

After inserting all keys from $K$, the height of the BST can increase at most by one

D

Number of nodes in the BST will double after inserting all keys from $K$