Consider an unordered list of N distinct integers. What is the minimum num ber of element comparisons required to find an integer in the list that is NOT the largest in the list?
Correct Answer :
1
Solution :
The correct option is 1.
To understand why this is the correct answer, let us break down the logical reasoning step-by-step:
We are given an unordered list containing
distinct integers. We assume
so that there is at least one element that is not the largest.
Since all the integers in the list are distinct, there is exactly one unique largest integer in the entire list. The remaining
integers in the list are strictly smaller than this maximum value, meaning any of them is "NOT the largest".
Now, let us select any two arbitrary elements from the list, say
and
.
If we perform a single comparison between these two elements, we will find one of the following:
1. If
, then
is strictly smaller than
. Because
is greater than
,
cannot possibly be the largest element in the entire list.
2. If
, then
is strictly smaller than
. Because
is greater than
,
cannot possibly be the largest element in the entire list.
In either case, a single comparison between any two elements allows us to immediately identify one element (the smaller of the two) that is guaranteed not to be the largest element in the list. Therefore, the minimum number of element comparisons required is exactly 1.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Mindyard. Perfect for teachers and institutes.
Copyright © 2026 Mindyard. All Rights Reserved.