GATE exam stream

GATE CS — Computer Science & IT

174 questions and papers

GATE CS 2005 — Question 58

Multiple choice 2 marks Compiler Design 2005

Consider the grammarS → ( S ) | aLet the number of states in the SLR(1), LR(1) and LALR(1) parsers for the grammar be \(n_1\), \(n_2\) and \(n_3\)…

GATE CS 2021 Set 1 – Question 36

Multiple choice 2 marks Algorithms 2021

Consider the following recurrence relation:\(T(n) = T(n/2) + T(2n/5) + 7n\) for \(n > 0\), and \(T(0) = 0\).Which one of the following options is correct?

GATE CS 2019 – Question 37

Multiple choice 2 marks Algorithms 2019

There are \(n\) unsorted arrays: \(A_1, A_2, \ldots, A_n\). Assume that \(n\) is odd. Each of \(A_1, A_2, \ldots, A_n\) contains \(n\) distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing…

GATE CS 2018 – Question 14

Multiple choice 1 mark Algorithms 2018

Assume that multiplying a matrix \(G_1\) of dimension \(p \times q\) with another matrix \(G_2\) of dimension \(q \times r\) requires \(pqr\) scalar multiplications. Computing the product of \(n\) matrices \(G_1 G_2 G_3 \ldots G_n\) using dynamic programming, the time…

GATE CS 2017 Set 1 – Question 39

Numerical answer 2 marks Algorithms 2017

A message is made up entirely of characters from the set \(X = \{P, Q, R, S, T\}\). The table of probabilities for each of the characters is shown below.CharacterProbabilityP0.22Q0.34R0.17S0.19T0.08Total1.00If…

GATE CS 2016 Set 2 – Question 36

Numerical answer 2 marks Algorithms 2016

Let \(G\) be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5 and 6. The maximum possible weight that…

GATE CS 2015 Set 2 – Question 14

Multiple choice 1 mark Algorithms 2015

An unordered list contains \(n\) distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is

GATE CS 2015 Set 1 – Question 34

Multiple choice 2 marks Algorithms 2015

Consider the following array of elements:<89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100>The minimum number of interchanges needed to convert it into a…