MCQ · 2 marks · Algorithm Analysis

GATE CS 2026 CS-2 — Q38

Consider an array AA of integers of size nn. The indices of AA run from 1 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, \dots, n - 1\} such that i>ji > j, (A[i+1]−A[i])>(A[j+1]−A[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?
Select one option