Goldman Sachs Interview Question: You have 8 pool balls and a b... | Glassdoor.co.in

Interview Question

Technology Analyst Interview Mumbai

You have 8 pool balls and a balancing scale. 1 of the balls

  is heavier than other 7. how will find the heavier one using the scale least possible times.
Tags:
analytical
Answer

Interview Answer

1 Answer

7

get 6 balls and weigh with 3 on each side.
If they weigh same then, weigh remaining 2 to find the heavy ball.

If they are unevenly weighed, then take the 3 from the heavy side and weigh any 2 of them. if they are not of same weight then you found the heavy one OR it means the 3rd one is the heavy one.

Normally candidates would apply binary search algorithm with 3 iterations but the best solution can be got in 2 iterations as explained above.

Interview Candidate on 09-Jul-2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.