GATE CS 2026 (Afternoon) — Question 38

AlgorithmsSearching, Sorting, Hashing MechanismsMCQ2 marks · −2/3 if wrongMedium

Consider an array \( A \) of integers of size \( n \). The indices of \( A \) run from 1 to \( n \). An algorithm is to be designed to check whether \( A \) satisfies the condition given below. \( \forall i, j \in \{1, \dots, n - 1\} \) such that \( 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?
  1. A
    \( \theta(n) \)
  2. B
    \( \theta(\log(n)) \)
  3. C
    \( \theta(n \log(n)) \)
  4. D
    \( \theta(n^2) \)
Practise the full 2026-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on Searching, Sorting, Hashing MechanismsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group