Array: GATE CS Previous Year Questions

Array · Data Structures

17 questions · asked in 12 of 27 years (2000–2026)

MCQ 15 · NAT 21-mark 13 · 2-mark 4

2000Questions per year2026

Questions 1–5 of 17

Q1GATE 2025 (Session 2)2 marksMCQ−0.67 if wrong
An array AA of length nn with distinct elements is said to be bitonic if there is an index 1≤i≤n1 \leq i \leq n such that A[1..i]A[1..i] is sorted in the non-decreasing order and A[i+1..n]A[i+1..n] is sorted in the non-increasing order.
Which ONE of the following represents the best possible asymptotic bound for the worst-case number of comparisons by an algorithm that searches for an element in a bitonic array AA?

Q2GATE 2024 (Session 2)1 markNAT
Let AA be an array containing integer values. The distance of AA is defined as the minimum number of elements in AA that must be replaced with another integer so that the resulting array is sorted in non-decreasing order. The distance of the array [2,5,3,1,4,2,6][2,5,3,1,4,2,6] is _____

Q3GATE 2021 (Session 1)1 markMCQ−0.33 if wrong
Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimum and maximum values in an arbitrary array of n elements. Which one of the following choices is correct?

Q4GATE 2021 (Session 2)1 markMCQ−0.33 if wrong
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size n?

Q5GATE 2017 (Session 1)2 marksNAT
Let A be an array of 31 numbers consisting of sequence of 0's followed by a sequence of 1's. The problem is to find the smallest index i that A[i] is 1 by probing the minimum numbers of locations in A. The worst case number of probes performed by an optimal algorithm is _____________.

Keep practising

Topics in Data Structures

All CS topics ›