Asymptotic Notation: GATE CS Previous Year Questions

Asymptotic Notation · Algorithms

40 questions · asked in 21 of 27 years (2000–2026)

MCQ 37 · MSQ 2 · NAT 11-mark 27 · 2-mark 13

2000Questions per year2026

Questions 1–5 of 40

Q1GATE 2026 (Session 2)1 markMCQ−0.33 if wrong
Consider the following functions, where nn is a positive integer.

n1/3,log⁡(n),log⁡(n!),2log⁡(n)n^{1 / 3}, \log (n), \log (n!), 2^{\log (n)}

Which one of the following options lists the functions in increasing order of asymptotic growth rate?
Note: Assume the base of log to be 22.

Q2GATE 2026 (Session 2)2 marksMCQ−0.67 if wrong
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 algorithm that can be designed for the problem?

Q3GATE 2024 (Session 1)1 markMCQ−0.33 if wrong
Given 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 making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is

Q4GATE 20231 markMSQ
Let ff and gg be functions of natural numbers given by f(n)=nf(n)=n and g(n)=n2g(n)=n^2.
Which of the following statements is/are TRUE?

One or more options are correct.

Q5GATE 20232 marksMSQ
Consider functions Function 1 and Function 2 expressed in pseudocode as follows:
Function_1 while n > 1 do for i = 1 to n do x = x + 1; end for n = n/2 ; end while Function_2 for i = 1 to 100 * n do x = x + 1; end for
Let f1(n)f_1(n) and f2(n)f_2(n) denote the number of times the statement "x=x+1""x = x + 1" is executed in Function 1 and Function 2, respectively.
Which of the following statements is/are TRUE?

One or more options are correct.

Keep practising

Topics in Algorithms

All CS topics ›