Skip to content

GATE CS question library

Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2026AlgorithmsAsymptotic Worst Case Time and Space ComplexityMSQ · 1 mark
Which of the following can be recurrence relation(s) corresponding to an algorithm with time complexity Θ(n)\Theta(n)?
Official PYQ2026Engineering MathematicsSets, Relations and FunctionsMSQ · 1 mark
Let RR be a binary relation on the set {1,2,…,10}\{1,2, \ldots, 10\}, where (x,y)∈R(x, y) \in R if the product of xx and yy is square of an integer. Which of the following properties is/are satisfied by RR?
Official PYQ2026Digital LogicNumber Representations (Fixed and Floating Point)MSQ · 1 mark
In a system, numbers are represented using 44-bit two's complement form. Consider four numbers N1=1011,N2=1101,N3=1010N 1=1011, N 2=1101, N 3=1010 and N4=1001N 4=1001 in the system. Which of the following operations will result in arithmetic overflow?
Official PYQ2026Compiler DesignParsing (LL, LR)MSQ · 1 mark
Which of the following grammars is/are ambiguous?
Official PYQ2026Engineering MathematicsMaxima and Minima, Mean Value Theorem, IntegrationMSQ · 1 mark
For a real number aa, let I(a)=∫−11(3x2−ax+1)dxI(a)=\int_{-1}^{1}\left(3 x^{2}-a x+1\right) d x. Which of the following statements is/are true?
Official PYQ2026AlgorithmsSearching, Sorting, HashingNAT · 1 mark
The keys 5,28,19,15,26,33,12,17,105,28,19,15,26,33,12,17,10 are inserted into a hash table using the hash function h(k)=k mod 9h(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)
Official PYQ2026Engineering MathematicsLinear Algebra: Matrices, Determinants, System of Linear EquationsNAT · 1 mark
Consider the system of linear equations given below. ax+y=b16x+ay=24\begin{array}{c} a x+y=b \\ 16 x+a y=24 \end{array} Suppose the values of aa and bb are chosen such that the system of linear equations produce multiple solutions. Then the product of aa and bb is ____\_\_\_\_. (answer in integer)
Official PYQ2026AlgorithmsSearching, Sorting, HashingNAT · 1 mark
Consider an array A=[10,7,8,19,41,35,25,31]A=[10,7,8,19,41,35,25,31]. Suppose the merge sort algorithm is executed on array AA to sort it in increasing order. The merge sort algorithm will carry out a total of 77 merge operations. A merge operation on sorted left array LL and sorted right array RR is said to be void if the output of the merge operation is the …
Official PYQ2026Computer NetworksFragmentation and IP Addressing, IPv4, CIDRNAT · 1 mark
If an IP network uses a subnet mask of 255.255.240.0255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is ____\_\_\_\_. (answer in integer)
Official PYQ2026Digital LogicNumber Representations (Fixed and Floating Point)NAT · 1 mark
The 3232-bit IEEE\text{IEEE} 754754 single precision representation of a number is 0xC27100000\text{xC}2710000. The number in decimal representation is ____\_\_\_\_. (rounded off to two decimal places)
Official PYQ2026Compiler DesignLexical AnalysisNAT · 1 mark
A lexical analyzer uses the following token definitions letter→[A−Za−z]{letter → [A-Za-z]} digit→[0−9]{digit → [0-9]} id→letter(letter∣digit)∗{id → letter (letter | digit)^*} number→digit{number → digit} +{ }^{+} ws→(blank∣tab∣newline){ws → (blank | tab| newline)} +{ }^{+} For the string given below, …
Official PYQ2026Engineering MathematicsGraphs: Connectivity, Matching, ColouringMCQ · 2 marks
Consider a complete graph KnK_{n} with nn vertices ( n>4n>4 ). Note that multiple spanning trees can be constructed over KnK_{n}. Each of these spanning trees is represented as a set of edges. The Jaccard coefficient between any two sets is defined as the ratio of the size of the intersection of the two sets to the size of the union of the two …
Official PYQ2026AlgorithmsShortest Paths (Dijkstra, Bellman-Ford)MCQ · 2 marks
Let GG be a weighted directed acyclic graph with mm edges and nn vertices. Given GG and a source vertex ss in GG, which one of the following options gives the worst case time complexity of the fastest algorithm to find the lengths of shortest paths from ss to all vertices that are reachable from ss in G?{G}?
Official PYQ2026AlgorithmsAsymptotic Worst Case Time and Space ComplexityMCQ · 2 marks
Consider an array AA of integers of size nn. The indices of AA run from 11 to nn. An algorithm is to be designed to check whether AA satisfies the condition given below. ∀i,j∈{1,…,n−1}\forall i, j \in\{1, \ldots, n-1\} such that i>j,(A[i+1]−A[i])>(A[j+1]−A[j])i>j,(A[i+1]-A[i])>(A[j+1]-A[j]) Which one of the following gives the worst case time complexity of the fastest …
Official PYQ2026AlgorithmsAlgorithm Design: Dynamic ProgrammingMCQ · 2 marks
Consider a table TT, where the elements T[i][j],0≤i,j≤nT[i][j], 0 \leq i, j \leq n, represent the cost of the optimal solutions of different subproblems of a problem that is being solved using a dynamic programming algorithm. The recursive formulation to compute the table entries is as follows: …
Official PYQ2026Digital LogicMinimization (K-Maps etc.)MCQ · 2 marks
Consider the following 44-variable Boolean function F(A,B,C,D)=Σm(0,1,2,3,8,9,10,11)F(A, B, C, D)=\Sigma m(0,1,2,3,8,9,10,11) Consider AA as MSB, DD as LSB. Which one of the following options represents the minimal sum of products form for the above function? Note: +{+} is OR operation, ⋅{\cdot} is AND operation, ′{\prime} is NOT operation
Official PYQ2026Compiler DesignParsing (LL, LR)MCQ · 2 marks
Consider the canonical LR(0)L R(0) parsing of the grammar below using terminals {a,b,c}\{a, b, c\} and non-terminals {A,B,C,S}\{A, B, C, S\} with SS as the start symbol. S→ACBA→aA∣ϵC→cC∣ϵB→bB∣b\begin{array}{l} S \rightarrow A C B \\ A \rightarrow a A \mid \epsilon \\ C \rightarrow c C \mid \epsilon \\ B \rightarrow b B \mid b \end{array} Which one of the following options gives the …
Official PYQ2026DatabasesNormal FormsMCQ · 2 marks
In the context of schema normalization in relational DBMS, consider a set F\text{F} of functional dependencies. The set of all functional dependencies implied by F\text{F} is called the closure of F\text{F}. To compute the closure of F\text{F}, Armstrong's Axioms can be applied. Consider X,YX, Y, and ZZ as sets of attributes over a relational …
Official PYQ2026Computer NetworksData Link Layer: Framing, Error Detection, MAC, Ethernet BridgingMCQ · 2 marks
Consider the transmission of data bits 110001011110001011 over a link that uses Cyclic Redundancy Check (CRC) code for error detection. If the generator bit pattern is given to be 10011001, which one of the following options shows the remainder bit pattern appended to the data bits before transmission?
Official PYQ2026Compiler DesignLocal OptimizationMCQ · 2 marks
Consider the control flow graph given below. Which one of the following options is the set of live variables at the exit point of each basic block?