← Quiz: Python Interview Programs: all 13 questions
Quiz: Python Interview Programs · Question 12 of 13
Binary search needs at most how many comparisons for a sorted list of 1,000 items?
Binary search needs at most how many comparisons for a sorted list of 1,000 items?
- A.1,000
- B.500
- C.About 10
- D.100
Answer & explanation
Correct answer: About 10
Each step halves the range, and 2 to the power 10 is 1,024.
Can you get the rest right without peeking?
Take the timed Quiz: Python Interview Programs quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →