1
GATE CSE 2026 Set 2
MCQ (Single Correct Answer)
+2
-0

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?

A

$\theta(n)$

B

$\theta(\log (n))$

C

$\theta(n \log (n))$

D

$\theta\left(n^2\right)$

2
GATE CSE 2025 Set 2
MCQ (Single Correct Answer)
+2
-0.67

An array $A$ of length $n$ with distinct elements is said to be bitonic if there is an index $1=i=n$ such that $A[1 . . i]$ is sorted in the non-decreasing order and $A[i+1 . . n]$ is sorted in the non-increasing order.

Which ONE of the following represents the best possible asymptotic bound for the worstcase number of comparisons by an algorithm that searches for an element in a bitonic array $A$?

A
$\Theta(n)$
B
$\Theta(1)$
C
$\Theta\left(\log ^2 n\right)$
D
$\Theta(\log n)$
3
GATE CSE 2016 Set 1
MCQ (Single Correct Answer)
+2
-0.6
An operator $$delete(i)$$ for a binary heap data structure is to be designed to delete the item in the $$i$$-th node. Assume that the heap is implemented in an array and i refers to the $$i$$-th index of the array. If the heap tree has depth $$d$$ (number of edges on the path from the root to the farthest leaf), then what is the time complexity to re-fix the heap efficiently after the removal of the element?
A
$$O\left( 1 \right)$$
B
$$O\left( d \right)$$ but not $$O\left( 1 \right)$$
C
$$O\left( {{2^d}} \right)$$ but not $$O\left( d \right)$$
D
$$O\left( {d{2^d}} \right)$$ but not $$O\left( {{2^d}} \right)$$
4
GATE CSE 2016 Set 2
Numerical
+2
-0
A complete binary min-heap is made by including each integer in $$[1,1023]$$ exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth $$0.$$ The maximum depth at which integer $$9$$ can appear is ___________.
Your input ____

GATE CSE Subjects

Browse all chapters by subject

Software Engineering
Web Technologies