Interview Question

Graduate Software Developer Interview

-

Scott Logic

You are given 8 identical looking balls. One of them is heavier than the rest of the 7 (all the others weigh exactly the same). You a provided with a simple mechanical balance and you are asked to find out the minimum amount of weighings necessary to identify the heavier ball.

AnswerAdd Tags

Interview Answers

3 Answers

0

The most logical way to do this, is by halving the balls into 2 x 4s. Put each half on each side of a scale, the half that is heavier will contain the heaviest ball, half the heaviest side again and repeat the process until you have one ball on each side of the scale and you find the heaviest ball, this should take only 3 attempts. If anyone has a better answer, please share :)

Matt on

0

It can be done in two steps, if you divide into 3-3-2 groups. If the 3-3 measures equal, than the heavier is between the two left, and it's just one more step. If one of the 3s is heavier measure two of that group, if they are equal then the third is the heavier, otherwise you have found it on the balance.

Gabor on

0

Incredible that interviewers are still asking this well known brain teaser!

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.