Beginner
Data Structures & Algorithms
Q6 / 100
What is the worst-case time complexity of binary search?
Correct! Well done.
Incorrect.
The correct answer is D) O(log n)
D
Correct Answer
O(log n)
Explanation
Binary search halves the search space each step, yielding O(log n) comparisons in the worst case. It requires the array to be sorted.
Progress
6/100