Binary Search
Compare target with middle element; discard half the list each step
O(log n) — much faster for large n
Find 7 in [1,3,5,7,9,11,13]:
Mid=7 → found! 1 comparison
Find 5 in [1,3,5,7,9,11,13]:
Mid=7 (idx 3). 5 < 7 → search left half
Mid=3 (idx 1). 5 > 3 → search right half
Mid=5 (idx 2). Found! 3 comparisons (log₂7≈3)
Max comparisons: ⌈log₂(n+1)⌉