Question 13 of 15
What is the time complexity of binary search on a sorted array of n items?
- A O(log n)
- B O(n)
- C O(n log n)
- D O(1)
A. O(log n)
Each step halves the search range, so about log₂ n steps are needed.
💻 Technology & Computers Hard
Question 13 of 15
What is the time complexity of binary search on a sorted array of n items?
Each step halves the search range, so about log₂ n steps are needed.