Advertisements
Advertisements
Question
Binary search looks for the element to search in position:
Options
First
Middle
Last
Any random
MCQ
Advertisements
Solution
Middle
Explanation:
- Binary search first checks the middle element of the sorted array.
- Based on the comparison, it searches either the left half or the right half.
shaalaa.com
Is there an error in this question or solution?
Chapter 8: Arrays - Sort & Search - Exercises [Page 197]
