What is the worst-case time complexity of binary search?

Understand the Problem

The question is asking for the worst-case time complexity of the binary search algorithm, which is focused on how long it takes to execute in the most challenging scenarios.

Answer

O(log n)

The final answer is O(log n)

Answer for screen readers

The final answer is O(log n)

More Information

Binary search works by repeatedly dividing the search interval in half, so its time complexity is logarithmic.

AI-generated content may contain errors. Please verify critical information

Thank you for voting!