Cisco Systems Interview Question: how many scale measurements d... | Glassdoor

## Interview Question

Software Engineer Interview

# how many scale measurements does it take to know which ball

out of 8 balls weighs more? Then how many does 28 balls take?

0

http://brainteaserbible.com/snooker-balls-weighing-scales

an87 on Jun 13, 2011
1

Two times:

1 - Split the balls into three groups of three balls each.
2 - First use of the scale: Weigh any two groups against each other.
3 - If the groups weigh the same then the heavier ball is in the third group, otherwise it is in the group that weighs more.
4 - We now know that the heavy ball is one of three.
5 - Second use of the scale: Using the group of balls that we know contains the heavy ball, weight any two balls against each other.
6 - If one of the balls is heavier then we have our answer. If the balls weigh the same then the third ball is the heavy one and we again have our answer.

BA on Sep 25, 2011
0

The way the problem is worded above is not clear. You could interpret the sentence to mean 'find the heaviest ball of 8 differently weighted balls' as opposed to 'find the one ball which is heavier than the rest, which weigh the same'. Just a little confusing.

Chris on Feb 24, 2012
0

Since the problem mentions finding the ball that is heavier or that weighs more than the rest, you can safely jump to the conclusion that all of the rest of the balls weigh the same each. If the problem was worded using superlatives, namely to have you find the heaviest ball or the one that weighs the most then you have to take into account the possibility that the balls all have different weights.

ajaynejr on Apr 11, 2012
0

1.Split the 8 balls in 2 groups: 4 balls in each one.
2.Weight which one is the heaviest. It could be with your hands.
3.Take the heaviest one and split in 2 different groups: 2 balls in each one.
4.Weight which one is the heaviest. It could be with your hands.
5.Take the heaviest one and split in 2 different groups: 1 ball in each one.
6.Weight the 2 balls separately and identify the heaviest one. It could be with your hands.

Rafa on Apr 16, 2012
0

Three scale measurements, which are as follows:
1.Split the 8 balls in 2 groups: 4 balls in each one.
2.Weight which one is the heaviest. It could be with your hands.
3.Take the heaviest one and split in 2 different groups: 2 balls in each one.
4.Weight which one is the heaviest. It could be with your hands.
5.Take the heaviest one and split in 2 different groups: 1 ball in each one.
6.Weight the 2 balls separately and identify the heaviest one. It could be with your hands.

Rafa on Apr 16, 2012
0

for 28 balls it takes max 4 times!

Anonymous on Apr 21, 2013
0

Can do in 2 steps: 1. Split 28 into 3 groups 12 of 2 sets and remaining 4 are other set. Compare 12 balls sets takeout one odd one. 2. Take 12 and split as 8 + 4 , then append second set 4 with third set 4 , after that compare both 8 ball sets.

Anonymous on Aug 25, 2015
0

8 or 9 balls =&gt; 2 measurements
measure 3 and 3, heaviest group 1 and 1, ball identified

28 balls =&gt;3 measurements
measure 9 and 9 , heaviest group 3 and 3 , heaviest group 1 and 1, ball identified

OTB on Apr 10, 2019