Bloomberg LP Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
1
of 1 vote

1)put 3 stones each sides
if they are equal then the heavier stone is in the left three stones, otherwise take the three stones of heavier side.
2)Put one on one side and the other on other side. If they are equal, then the left one is the heavier stone otherwise the heavier of the two stones is the required stone.

- vinaysachdeva23 November 22, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

It's a medical scale not a balancing scale

- Anonymous November 22, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

So what is this medical scale.How it works?

- Anonymous November 22, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

google it

- denonymous November 22, 2010 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Divide 9 balls in 3 groups of 3 each, call them G1, G2, G3
1) First Measurement: First weight G1 and G2 groups
If they are the same weight, G3 group contains the heavier ball, if not, the heavier of G1 and G2 contains the heavier ball.
Let's say G3 contains the heavier ball.
2) Pick G3
3) Second measurement: Choose and weight 2 balls from the G3 group
If both balls have same weight, the 3rd ball is heavy, otherwise the heavier ball will tip the scale more.

I think the entire talk of the medical scale is just bad terminology used by the interviewer. I am fairly certain he meant the weighing scale and want a solution that contains 2 measurements.

- Ali June 03, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess that, the key is the medical-scale and how it weighs, unless its balancing we are not weighing, if its stuck as heavier than the marked weight or as lighter as the marked weight we are not weighing.

This is what I think.
1. Keep one stone apart, call it #9.
2. Take four stones say (1,2,3 and 4 ), put them on the platform and balance their weight, (slide the slider to the mark). Measuring#1. Now unless we balanced the weight again we are not measuring.
3. Now remove all the four stones and put other four (5,6,7 and 8 ), now if the scale balances the heavier is #9.
4. If the scale is unbalanced and stuck as heavier go to step# 5, if the scale is unbalanced as lighter go to step# 8.
5. Place #1 on platform, still the balance beam wont move, it will be stuck as heavier.
6. Now remove #5, if the scale balances #5 is the heavier one.
7. If the scale is still stuck as heavier, place #2 then remove #6, if balanced #6 is the heavy one, else if still stuck as heavier, place #3 then remove #7 if balanced #7 is the heavy one else #8 is the heavy one.
8. Remove #5 from the platform, still the balance beam wont move, it will be stuck as lighter.
6. Now place #1, if the scale balances #1 is the heavier one.
7. If the scale is still stuck as lighter, remove #6 then place #2, if balanced #2 is the heavy one, else if still stuck as lighter, remove #7 then place #3, if balanced #3 is the heavy one else #4 is the heavy one.

- riderchap November 22, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

If what you say is true i.e. trying to balance the scale is what counts that just make 3 groups. 4-4-1.

- Balance the scale for the first group with 4 balls.
- Now put the second group on the scale. Don't touch anything on the scale.
- If it balances the lonely stone is the heavy one.
- If 2nd grp is heavier than we know that the lonely stone is OK. Balance the scale using that ball (second scaling). Now just check each stone in the 2nd grp and fine the heavier one.
- If 1st grp is heavier than we know that the lonely stone is OK. Balance the scale using that ball (second scaling). Now just check each stone in the 1st grp and fine the heavier one.

- Rayden November 22, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

We could do it with only one scaling, couldn't we? Balance it, figure out either the left out ball as a normal one or a heavier one. If it's a normal one, we know the group which contains the heavier ball. Put the group with the heavy ball on the scale. It will not balance. Keep replacing until the scale balances and you figure out the heavier ball. Please correct me if I am wrong.

- Neo October 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

We could do it with only one scaling, couldn't we? Balance it, figure out either the left out ball as a normal one or a heavier one. If it's a normal one, we know the group which contains the heavier ball. Put the group with the heavy ball on the scale. It will not balance. Keep replacing until the scale balances and you figure out the heavier ball. Please correct me if I am wrong.

- Neo October 28, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

split into 3 groups of 3 each

- Anonymous November 22, 2010 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More