Skip to main content

What is the time complexity of binary search and why?

Class 11medium👁 1 views
🤖
AI Step-by-Step Solution
Verified by MscTutor AI

The time complexity of binary search is $O(\log n)$ because the search interval is halved at every step, so at most $\lceil \log_2 n \rceil$ comparisons are needed.

Have a different question?

Ask AI any NCERT question — Text, Image, Voice or PDF

Ask AI Now — Free! →
📚 Study More
🤖 AI Teacher📋 Mock Test📐 Formulas📚 Classes