Bloomberg LP Interview Question
Financial Software DevelopersRight answer. Just a little correction....
As there are 5 bottles instead of 4, so
Label the 5 bottles A,B,C,D and E. Take 1 tablet from A , 2 from B , 3 from C, 4 from D and 5 from E and weigh it. if the weight is 149 the lighter bottle is A , if its 148 its from B and so on..
:-)
But to do that, we need to know how many pills each bottle contains!
And it should be the same quantity of pills in each bottle.
Then it is easy:
Let say, we have 10 pille in each bottle.
Then, if all of them contain heavy pills, they all together should weigt:
90+80+70+60+50
If we have light pills in the first one, they should weight:
(90-9)+80+70+60+50
If we have light pills in the second one, they should weight:
90+(90-9*2)+70+60+50
And so on.
WHY THE F--K ARE BRAINTEASER GIVEN.
IT'S SO OLD SCHOOL.
MODERN COMPANIES DON'T GIVE BRAIN TEASERS ANYMORE.
IN FACT, IT'S BAN IN MICROSOFT AND GOOGLE!
GET ON WITH THE PROGRAM BLOOMTURD
Label the 4 bottles A,B,C and D. Take 1 tablet from A , 2 from B , 3 from C and 4 from D and weigh it. if the weight is 99 the lighter bottle is A , if its 98 its from B and so on..
- Musheka December 12, 2009