Interview Question

Applications Support Analyst/Consultant Interview

-Toronto, ON

FDM Group

You have 20 balls all equal in size. They all weigh the same except for one. How do you identify the one that weighs less or more?

AnswerAdd Tags

Interview Answers

4 Answers

3

If we can do as many times as we want, just random pick 2 balls. If they have equal weight, compare with the rest. If not, just pick the third one to find out which One is the exception.

Anonymous on

2

• Break the balls into the following groups: (1, 2, 3), (4, 5, 6), (7, 8) • Step 1. Weigh (1, 2, 3) against (4, 5, 6) Two possible outcomes: The two groups are equally heavy. (Case A) One of these groups is heavier than the other. (Case B) • Case A >> Weigh 7 against 8. Now you have identified the heavier ball in 2 weighing. • Case B >> Take the heavier group (assume it to be (1, 2, 3)), take any two balls and weigh them against each other. Either one of these is heavier else the third ball is.

Mohammed on

0

The above answers is for 8 balls.

Anonymous on

0

The above answer doesn't work. The unique ball can weigh less or more than the other balls. You assumed the unique ball is the heavier one.

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.