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?
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.
Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.
Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.
Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.
Prepare effectively for GATE 2026 Computer Science & Information Technology (CS & IT) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Data Structures, Algorithms, Operating Systems, DBMS, Computer Networks, Theory of Computation, Compiler Design, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 preparation strategy.
Prepare for GATE 2026 Electrical Engineering (EE) with high-quality study material, previous year question papers, mock tests, syllabus updates, exam pattern, and expert preparation strategies. Master core EE subjects including Power Systems, Control Systems, Electrical Machines, Circuit Theory, Signals & Systems, Power Electronics, and Measurements to secure a top rank in GATE 2026.
Copyright © 2026 Combe Labs Private Limited. All Rights Reserved.