$ ./guess_the_languageProblem Solving — fill the blank
Problem Solving — fill the blank · easy · #55

Fill in the complexity of binary search.

# Binary search on a sorted array is O(log ____)

Answer: n (also accepted: n)

Each step halves the range, giving O(log n).
Play Problem Solving ▸