🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Searching and Sorting in C: all 10 questions

Quiz: Searching and Sorting in C · Question 2 of 10

At most how many comparisons does binary search need for 1,000 sorted elements?

At most how many comparisons does binary search need for 1,000 sorted elements?

  1. A.1,000
  2. B.500
  3. C.About 10
  4. D.About 100
Answer & explanation

Correct answer: About 10

2¹⁰ = 1024 ≥ 1000, so about 10 halvings are enough.

Can you get the rest right without peeking?

Take the timed Quiz: Searching and Sorting in C quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →