1
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)$

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

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

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, in that order. When an element arrives, it is assigned either to $S$ (pushed on $S$ ) or to $Q$ (enqueued to $Q)$. Once all the five elements are stored, the output is generated in two steps. First, stack $S$ is emptied by popping all elements. Then queue $Q$ is emptied by dequeueing all elements. The output obtained by following this process is 43125 .

Given the output, the objective is to predict whether an element was assigned to $S$ or $Q$. Which of the following options is/are possible valid assignment(s) of the elements?

Note: In the options, the notation $x S$ denotes that element $x$ was assigned to $S$ and $y Q$ denotes that element $y$ was assigned to $Q$.

A

$1 S, 2 Q, 3 S, 4 S, 5 Q$

B

$1 Q, 2 Q, 3 S, 4 S, 5 Q$

C

$1 Q, 2 Q, 3 Q, 4 S, 5 S$

D

$1 S, 2 S, 3 S, 4 Q, 5 Q$

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

$$ \text { In the context of DBMS, consider the two sets } \mathbf{T} \text { and } \mathbf{S} \text { given below. } $$

$$ \begin{array}{ll}\,\,\,\,\, \text { T } &\,\,\,\,\, \text { S } \\ \text { I: } \text { Logical schema } & \text { L: Views } \\ \text { II: } \text { Physical schema } & \text { M: File organization and indexes } \\ \text { III: External schema } & \text { N: Relations } \end{array} $$

Which one of the following is the correct match from $T$ to $S$ ?

A

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

B

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

C

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

D

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