ProgrammingHard

A recursive binary search on n = 1000 sorted values reaches what maximum recursion depth?

  1. A. 9
  2. B. 11
  3. C. 10
  4. D. 1000

Correct answer: C. 10

Each call halves the range, so the depth is about log2(1000), which rounds up to 10.

More C Programming questions

Exams that ask this topic