GATE 2026 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2026 (Session 2)

65 questions

MCQ 35 · MSQ 11 · NAT 191-mark 30 · 2-mark 35

Questions 46–50 of 65

Q46File System2 marksMCQ−0.67 if wrong
An index in a DBMS is said to be dense if an index entry appears for every search-key value in the indexed file. Otherwise it is called a sparse index. Consider the following two statements.

S1\text{S1}: A hash index must be a dense index
S2\text{S2}: A B+B^{+} tree index can be a sparse index

Which one of the following options is correct?

Q47Finite Automata2 marksMSQ
Consider the following two finite automata D1D_{1} and D2D_{2}.
0 0 0 1 1 0 1 0 1 D1 0 1 1 1 1 0 0 1 D2
Which of the following statements is/are true?

One or more options are correct.

Q48Context Free Grammar2 marksMSQ
Let Σ={a,b,c,d}\Sigma=\{a, b, c, d\} and let L={aibjckdℓ∣i,j,k,ℓ≥0}L=\left\{a^{i} b^{j} c^{k} d^{\ell} \mid i, j, k, \ell \geq 0\right\}.

Which of the following constraints ensure(s) that the language LL is context-free?

One or more options are correct.

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

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

Corresponding to every leaf node LiL_{i} that has a non-NULL Suc⁡(Li)\operatorname{Suc}\left(L_{i}\right), a new key kik_{i} with the following property is to be inserted into the BST.

Val(Li)<ki<Val(Suc(Li)){Val}\left(L_{i}\right) < k_{i} < Val ({Suc}(L_{i}))

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

Which of the following statements is/are true?

One or more options are correct.

Q50Queue2 marksMSQ
Consider a stack SS and a queue QQ. Both of them are initially empty and have the capacity to store ten elements each. The elements 1,2,3,41,2,3,4, and 55 arrive one by one, in that order. When an element arrives, it is assigned either to SS (pushed on SS ) or to QQ (enqueued to QQ ). 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 QQ is emptied by dequeueing all elements. The output obtained by following this process is 4 3 1 2 5\text{4 3 1 2 5}.

Given the output, the objective is to predict whether an element was assigned to SS or QQ.

Which of the following options is/are possible valid assignment(s) of the elements?
Note: In the options, the notation xSx S denotes that element xx was assigned to SS and yQy Q denotes that element yy was assigned to QQ.

One or more options are correct.