Binary search on a sorted list has an order of growth of:
AOrder log N
BOrder N sq
COrder N cube
DOrder N four
Answer & Solution
Correct answer: A. Order log N
1. Each step halves the remaining list.
2. Halving repeatedly gives a logarithm.
3. So it is order log N.
_Source: OpenStax Introduction to Computer Science, Chapter 3, Data Structures and Algorithms._
Keep practising Data Structures and Algorithms
Browse all Data Structures and Algorithms questions for Coding Interview Prep, or explore more Computer Science topics.