What is the worst-case time complexity of Binary Search for an array of size "n"?
Show answerHide answer
Correct answer: (A) O(log n)
Explanation
Binary search halves the search range on every comparison, so at most about log₂n + 1 comparisons are needed: O(log n).