Comment on Programmer tries to explain binary search to the police

<- View Parent
Sagifurius@lemm.ee ⁨10⁩ ⁨months⁩ ago

That’s easy enough to answer, but he really should work on his grammar. In that case you just do 3 groups of three, weigh two of them. If they’re even, the third group is different. Weigh 2 membres of the third group, they’ll either be even or one heavier. Weight the last member against the heavier one from step 2 to see if they’re even or not for your answer.

source
Sort:hotnewtop