Adobe Interview Question: There are 8 balls that look t... | Glassdoor

# There are 8 balls that look the same. 1 of these balls is

heavier than the rest. WIth a double scale, how would you find the heaviest ball?

0

split the 8 balls into 2 groups of 4. weight each group on each side of the scale. Discard the lighter side. Take the heavier group and split into 2 groups of 2. Discard the lighter side. Take the heavier group and split into 2 groups of 1. the heavier side is the heaviest ball.

Interview Candidate on Feb 13, 2013
4

You split the balls in 3 groups - 3, 3, 2.
1st weigh. On each side of the scale place 3 balls.
- If he groups are equal in weight, then w)eigh the 2 balls from the 3rd group =&gt; you'll have your answer in 2 steps (2nd weigh)
- If the 3-ball groups are not equal in weight, pick the heaviest.
2nd weigh: on each side of the scale place one ball from the previously chosen group of 3.
- if the balls are equal, the heaviest is the one that is left
-otherwise, the scale will tell you which ball is heavier.
Thus, you use the scale only 2 times. This is the minimum number of operations that has to be done.

Alexandra on Feb 14, 2013
0

Split into 3,3,2
say a3,b3,c2
take a3,b3 [1st weigh]
Now there are 2 possibilities:

1) if equal then goto c2 and weigh those 2 to know the heavier one [2nd weigh]

2) say a3 is heavier
now weigh 2 (say x and y)out of the 3 (say x,y,z)of them [2nd weigh]
Now again 2 possibilities
-if equal the 3rd left one ie z is the heaviest
-if one say x is heavier than y, then that is the heaviest one!

HENCE we need to weigh 2 times.

Sowmya on Aug 15, 2013