Assume a list =[2, 4, 6, 8, 10, 12, 14]
How many comparisons are required to find element '4' in the list using Binary search?
Assume a list =[2, 4, 6, 8, 10, 12, 14]
How many comparisons are required to find element '4' in the list using Binary search?
Solution
✅ Correct Option: 3
Binary search compares the target with the middle element and discards half the list each time, using .
| Comparison | low | high | mid | Element at mid | Result |
|---|---|---|---|---|---|
| 1 | 0 | 6 | 3 | 8 | , search the left half |
| 2 | 0 | 2 | 1 | 4 | Found |
Related questions:
2026: 19 May Shift 1
2025: 16 May Shift 1