GATE CS 2026 · Set-2 · Predicate Logic (First-Order Logic)

MCQ · 2 marks · Problem AI-LOGIC-0066

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, \ldots, 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\left(n^{2}\right)\)

Solve it on GATE DA practice →More Logic problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/523118/gate-cse-2026-set-2-question-28

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com