Expedia

  www.expedia.com
  www.expedia.com

Interview Question

Software Development Engineer II Interview Bellevue, WA

Given a balance and marbles where one marble weighs more

  than the other, how many times do you have to use the balance to find the heaviest marble for 7 marbles. Then, extend that answer to how many marbles can you weigh with 4 tries.
Answer

Interview Answer

2 Answers

1

Q: how many times do you have to use the balance to find the heaviest marble for 7 marbles
Answer : Twice
Explanation:
1 . Put three marbles at the each side of balance leaving one.
           If both of the sides of balance are equal , then the one left is the heaviest.
           if not take the three marbles which weight more.
2. Among out of 3 from above collection , put one at each side of balance and leave the third one.
           If both side of balance is same then the marble left is heaviest.
           Or the marble which weigh more in the balance is the heaviest.

Puzzle Lover on Jan 27, 2013
0

Put any four marbles at the each side of the balance leaving three
    If both of the sides of balance are equal then
         select any 2 marbles out of the left 3 marbles and weight
                If both sides of balance are equal then the left one is heaviest
                Otherwise the marble which weight is more is the heaviest
    Otherwise weight the marbles that is on heaviest side and one of them is the heaviest one

Anonymous on Oct 13, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.