Comment on Programmer tries to explain binary search to the police

Pazuzu@midwest.social ⁨6⁩ ⁨months⁩ ago

I thought this had to be hyperbole, so I did the math myself. I’m assuming human history is 200,000 years as google says, and we want to narrow this down to the second the bike disappeared. also that the bike instantly vanished so there’s no partially existing bike.

each operation divides the time left in half, so to get from 200k years (6.311×10^12 seconds) to 1 would take ~42.58 divisions, call it 43. even if we take a minute on average to seek and decide whether the bike is there or not it would still be less than an hour of manual sorting

hell, at 60fps it would only take another 6 divisions to narrow it down to a single frame, still under an hour

source
Sort:hotnewtop