Microsoft Interview Question: Very simple question: There a... | Glassdoor

Interview Question

Software Development Engineer I Interview(Student Candidate)

Very simple question: There are 9 jars. 8 jars contain

  marbles which each marble weights 1 gram, and 1 jar contains marbles weight 1.1 gram. With a scale display number, how can define which jar contain 1.1 gram marble with only 1 scale.

Interview Answer

1 Answer


Number the jars from 1, 2, ... 9. Jar number k take k marbles.
Total have 45 marble. Now scale 45 marbles. If the scale displays 45.x, then x is the jar contains 1.1 gram marble.

Interview Candidate on Dec 8, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.