In the given list=[-4, 0, 2, 7, 8, 17, 19]. Determine the number of iterations required to find element 7 using binary search.
In the given list=[-4, 0, 2, 7, 8, 17, 19]. Determine the number of iterations required to find element 7 using binary search.
Solution
✅ Correct Option: 1
Binary search first checks the middle element. The list has 7 elements at indices 0 to 6.
The element at index 3 is , which is the target, so the search ends at the first comparison:
Related questions:
2026: 11 May Shift 2
2026: 26 May Shift 1
2026: 23 May Shift 2
2025: 30 May Shift 2
2025: 13 May Shift 2