Interview Question

Associate Software Engineer Interview

-

MicroStrategy

Given a scale and an object that can way between 1 to 40 grams. What is the minimum number of counter weights that you can buy to weigh anything in the range of 1 to 40.

AnswerAdd Tags

Interview Answers

4 Answers

1

The answer is 6. counter weights of 1, 2, 4, 8, 16 ,32

Anonymous on

0

Can the answer also be 1, 3, 9, and 27. That means only 4 weights

Anonymous on

0

Can the answer also be 1, 3, 9, and 27. That means only 4 weights

Anonymous on

0

Can the answer also be 1, 3, 9, and 27. That means only 4 weights

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.