Question DSA-SRCH-0002
EasyIn binary search, how many comparisons are needed in the worst case for 1024 elements?
- A.
About 10 (11 at most)
- B.
1024
- C.
Show answer and explanation
Answer: A
log₂ 1024 = 10, so about 10 halvings reduce the range to one element.