Question:

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?

Show Hint

To find a non-maximum element, just compare any two distinct elements — the smaller one is guaranteed to be non-maximum.
Updated On: Feb 8, 2026
  • 1
  • \(N-1\)
  • \(N\)
  • \(2N-1\)
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Understanding the requirement.
We are not asked to find the largest element. We are only asked to find any element that is NOT the largest. This is much easier than finding the maximum.
Step 2: Key observation.
If we compare any two distinct elements in the list, one of them must be smaller than the other. That smaller element cannot be the largest element of the list.
Step 3: Minimum comparisons.
Therefore, a single comparison between any two elements is sufficient: - Compare \(a_1\) and \(a_2\). - The smaller of the two is guaranteed to be not the largest in the list. So, only 1 comparison is needed in the best and worst case.
Step 4: Analyzing the options.
(A) 1: Correct — one comparison is sufficient.
(B) \(N-1\): Needed to find the maximum, not a non-maximum.
(C) \(N\): Too many comparisons.
(D) \(2N-1\): Irrelevant for this problem.
Step 5: Conclusion.
The minimum number of comparisons required is \(\boxed{1}\).
Was this answer helpful?
0
0