Computer ScienceGeneralQuality 69 · Exceptional
How Binary Search Works
PR
Petra Mansoor Verified Teacher
@author · 2026-06-11 · v1
7 min read
Binary search finds a value in a sorted list by repeatedly halving the search space. Compare the target to the middle element: if smaller, search the left half; if larger, the right. This gives
time instead of
for linear search — finding an item in a million entries takes about 20 steps.
0 teacher endorsements
Discussion
Comments support LaTeX — write inline with $...$.
Sign in to join the discussion.
No comments yet
Be the first to share your thoughts.
