Binary search needs only one iteration when the key is which value?
AThe missing value
BThe middle value
CThe minimum value
DThe maximum value
Answer & Solution
Correct answer: B. The middle value
1. Binary search examines the middle element first.
2. A match there ends the search immediately.
3. Binary search requires only 1 iteration when the key is the middle value.
4. So the answer is the middle value.
_Source: syllabus Computer Science, Ch 5 'Sorting' and Ch 6 'Searching'_
Keep practising Sorting and Searching
Browse all Sorting and Searching questions for IGNOU MCA, or explore more Computer Science topics.