Finding a value: scan, halve, or sort firstLesson 2 of 8Free preview
Halving a sorted manifest: binary search
Mitu finds #146 in 4 probes. Why sorted order makes the discard safe, and where ⌊log₂ n⌋ + 1 comes from.
Finding a value: scan, halve, or sort firstLesson 2 of 8Free preview
Mitu finds #146 in 4 probes. Why sorted order makes the discard safe, and where ⌊log₂ n⌋ + 1 comes from.