Searching questions

Q20

GATE CS 2025 CS-2Searching Sorting and HashingMCQ1 mark−1/3 if wrong
Consider an unordered list of NN distinct integers.

What is the minimum number of element comparisons required to find an integer in the list that is NOT the largest in the list?
Show answer without attempting

Answer: A

Q2

GATE CS 2021 CS-1Searching Sorting and HashingMCQ1 mark−1/3 if wrong
Let P be an array containing nn integers. Let tt 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 nn elements. Which one of the following choices is correct?
Show answer without attempting

Answer: C

Q48

GATE CS 2017 CS-1Searching Sorting and HashingNAT2 marks
Let AA be an array of 3131 numbers consisting of a sequence of 00's followed by a sequence of 11's. The problem is to find the smallest index ii such that A[i]A[i] is 11 by probing the minimum number of locations in AA. The worst case number of probes performed by an optimal algorithm is ____________.
Show answer without attempting

Answer: 5.0

Q39

GATE CS 2014 CS-1Searching Sorting and HashingNAT2 marks
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _________________.
Show answer without attempting

Answer: 147.1 to 148.1

0/40 correct0 marks

Related topics in Searching Sorting and Hashing