GATE CS 2025 Set 2 | Question 20
Algorithms › Algorithm Analysis · MCQ · 1 mark · Answer: A
- Question 20Algorithmsmcq1 markConsider an unordered list of 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?
- A.1✓
- B.
- C.
- D.
Answer: A
Solution
Answer: (A) 1 Compare any two elements once. The smaller of the two is certainly not the largest element of the whole list. So a single comparison suffices. - A.
More GATE PYQ on Algorithm Analysis
All GATE CS Algorithms PYQ →Attempt GATE CS 2025 Set 2 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →