GATE 2025 CS (CS2) – Question 20
Consider an unordered list of $N$ 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?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) $1$
Explanation
Compare any two elements. The smaller one is certainly not the largest, so one comparison suffices.