• RSS
  • Facebook
  • Twitter

Knowledge is Power.

  • Who you are ?

    Working on machines without understanding them ? Then you should be here..

  • Where you are ?

    Geographical location should not become a barrier to Share our knowledge.

  • What do you do ?

    Puzzles and Interview question are intended to be discussed here.

    Sunday, February 21, 2010

    Easy and popular version : There are 8 balls that look identical. One of them weighs less than the others. Given a weighing scale, how will you find this ball.

    Answer : Split the balls into groups of 3-3 and 2 (and this is the trick). Name these groups A,B and C. Now, lets weigh group A and B. If both are equal – > the lighter ball is in group C.

    If A is lighter than B – > Compare A1 and A2 -> Both are equal -> A3 is the lighter.

    -> A1 is lighter than A2 -> A1 is lighter

    -> A2 is lighter than A1 -> A2 is lighter

    If B is lighter than A – > Compare B1 and B2 -> Both are equal -> B3 is the lighter.

    -> B1 is lighter than B2 -> B1 is lighter

    -> B2 is lighter than B1 -> B2 is lighter

    0 comments:

    Post a Comment