GATE CS Algorithms Previous Year Questions

5 solved GATE CS questions on Algorithms, drawn from 1 exam year and grouped by year. Every question shows the official answer and a step-by-step solution.

GATE CS 20245 questions

  1. Set 1 Q17Given an integer array of size NN, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by…MCQ · +1 marks · Easy
  2. Set 1 Q42Consider the following recurrence relation: T(n)={nT(n)+nfor n1,1for n=1.T(n) = \begin{cases} \sqrt{n}T(\sqrt{n}) + n & \text{for } n \ge 1, \\ 1 & \text{for } n = 1. \end{cases} Which…MCQ · +2 marks · Medium
  3. Set 1 Q45Let GG be a directed graph and TT a depth first search (DFS) spanning tree in GG that is rooted at a vertex vv. Suppose TT is also a breadth first search…MSQ · +2 marks · Hard
  4. Set 2 Q35Let AA be an array containing integer values. The distance of AA is defined as the minimum number of elements in AA that must be replaced with another…NAT · +1 marks · Medium
  5. Set 2 Q59The number of distinct minimum-weight spanning trees of the following graph is _________ [figure]NAT · +2 marks · Hard

Other GATE CS topics

Practice Algorithms with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free