Sagifurius@lemm.eetoProgrammer Humor@programming.dev•Programmer tries to explain binary search to the police
1·
1 year agoThat three dude
That three dude
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.
The question is to figure out who is different, not how they are different. That takes one more step, half the time.
That’s not the question. Either the scales balance, and the third is heavier or lighter, or the scales don’t balance and you get both answers, but the question is purposely framed this way
Well I meant to write 3 groups of four. Same general thought just adjust the logic somewhat