GATE CS 2026, set 2 · Question 38 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
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.
∀ i, j ∈ {1, …, 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?
- (A) Θ(n)
- (B) Θ(log(n))
- (C) Θ(n log(n))
- (D) Θ(n²)
Answer
Answer (A)
Answer from the official GATE CS 2026 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes