← Binary Search Quiz: all 8 questions
Binary Search Quiz · Question 1 of 8
About how many comparisons does binary search need on 1,000,000 sorted numbers?
About how many comparisons does binary search need on 1,000,000 sorted numbers?
- A.About 1,000
- B.About 1,000,000
- C.About 20
- D.About 500,000
Answer & explanation
Correct answer: About 20
log₂(1,000,000) ≈ 20, because each comparison halves the remaining range.
Can you get the rest right without peeking?
Take the timed Binary Search Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →