Microsoft interview questions

Tuesday, January 24, 2006

Eight balls

You are given a scale which you are to use to measure eight balls. Seven of these balls have the same weight: the eigth ball is heavier than the rest. The scale does not indicate the weight of a particular object; it is a scale which tells you which of the two sides being weighed is heavier (like the scale that lady of justice statue holds up). So, for example you could place one ball on each end of the scale. If ball one was heavier than ball two, it would tip in ball one's direction; if ball two were heavier, it would tip io ball three's direction; if the balls were of equal weight, the scale would not tip at all. What is the minimum number of weighs you could perform to find the heaviest of the eight balls?

1 Comments:

  • Put three of the balls on each side. If one side is havier, take those balls and put one on each side. So two measures are sufficient

    By Blogger Ivic, at 8:56 AM  

Post a Comment

<< Home