Bloomberg LP Interview Question for Financial Software Developers


Country: United States
Interview Type: Phone Interview




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

it's simple:
take 1 apple from box 1, 2 apples from box 2 ... 10 apples from box 10

put all on scale, say it shows XX.Y pounds
look at Y (fractional part).
if it's 0, it's box 10
1 - box 9
2 - box 8
...
9 - box 1

- amustea November 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Smart!

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

Thanks dude, this is the correct answer

- miracle2121 November 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

The question specifically states that you don't have a scale.

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

@Second Anonymous: he meant "digital weight". There is no comparison of weights, only an absolute number, so this solution is correct.

This is probably not the only possible correct solution, but it certainly is correct.

- eugene.yarovoi November 28, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nice

- SantiagoYMG December 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

it is correct

- right May 29, 2012 | Flag
Comment hidden because of low score. Click to expand.
2
of 2 votes

a little modification:
take 1 apple from box 1, 2 apples from box 2 ... 9 apples from box 9. That's it.

no need to take any apple from box 10.

- st.jeanbao April 17, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Assign a number to every box say 1-N.
Take i apples from box i for measurement.
You will end up in [{N x (N+1) / 2} - {j x 0.9}] pounds.
Since you know N, calculate for j, which is the faulty box!

- kartikaditya December 01, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

should be [{N x (N+1) / 2} - {j x (1 - 0.9)}]

- Polluxgx February 23, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

well done amustea!!!!

- hector December 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

One step solution:
1. Label boxes 1- 10.
2. Pick 1 apple from 1st box, 2 apples from 2nd box,.....10 apples from 10th box.
3. If all were good, their weight should add up to 1^2 + 2^2 + .....+10^2 = n.(n+1).(2n+1)/6 = 385.
4. Now measure the actual weight A.
5. (385 - A)*10 is your answer.

- McD February 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

If all were good, their weight should be 1+2+3+4+5+6+7+8+9+10=55

Thus should be (55-A)*10

- Anonymous April 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

One step solution:
1. Label boxes 1- 10.
2. Pick 1 apple from 1st box, 2 apples from 2nd box,.....10 apples from 10th box.
3. If all were good, their weight should add up to 1^2 + 2^2 + .....+10^2 = n.(n+1).(2n+1)/6 = 385.
4. Now measure the actual weight A.
5. (385 - A)*10 is your answer.

- McD February 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What happens if there are less than 55 (1+2+....10) apples in total in all the boxes ?

- Lib Rozario July 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I have 1 solution if it was a weighing scale:
1) Take 1 apple from 1 box
2) Divide 10 apples in 4 groups of 3-3-3-1
3) Check each group on weighing scale
4) It is done in a single step

- Birbal October 17, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How many small boxes of apples does it take to fill 100 spaces

- Judy October 08, 2020 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

amonbvjyuxcedfxu

- Yuseoung Shin October 27, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

helo

- friday night funkin October 27, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If 10 boxes of apples is worth $20 and each box is worth 15c, how many are all apples worth without the box

- Anonymous June 14, 2022 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Scrutinize all the other apples in all the boxes.The bad apples might look bad, smaller, wrinkled, smell off, dark patches ... pick the worst looking one from that box that look "terrible" and another from any box, that looks OK. Feel them (to be convinced) and weigh the one that looks bad. Use all the senses to judge, and the scale to verify.

We are comparing apples to apples and a tenth of a pound off is not negligible.

- Lynda T.S. January 15, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

hi

- Yuseoung Shin October 27, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

what you say is actually 10 steps (sort of smartly merged into one big step )

- amustea November 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

the solution should be done in 1 step. in your case it is n number of steps where n is no. of apples

- rob November 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

What do you define as a step? Number of movements you make? He has assumed a step means reading once on the digital scale.

- Rayden November 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its really one step :)

- JJJ January 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its really 10 step :(

- jjj January 11, 2012 | Flag


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