Microsoft Interview Question: How would you determine the h... | Glassdoor

Interview Question

Intern Interview

How would you determine the heaviest marble among 9 marbles

  where one is heavier and you can use the scale only twice?

Interview Answer

1 Answer


You split the marbles in triads and you scale the two of them.
1a.they weight the same take 2 marbles from the last triad and you put them separately in the scale.
If the marbles weight the same then the third one is the heavier else we can find from the scale which one is the heavier. take the triad that's heavier and you continue with step 2.

Interview Candidate on Nov 23, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.