Bloomberg LP Interview Question for Financial Software Developers


Country: United States
Interview Type: Phone Interview




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

Pick one fruit from the basket labeled "mixed". If apple comes out, tag it to "apple". Change the basket labeled as "apple" to "orange" and the basket labeled as "orange" to "mixed".
Otherwise if orange comes out, tag it to "orange". Change the basket labeled as "orange" to "apple" and the basket labeled as "apple" to "mixed".

- aasshishh March 28, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

containter 1 2 3
actually contatins : 'A' apple ,'O' orange ,'M' mixed
label shows : 'O' orange,'M' mixed, 'A' apple,
Remember that all labels are INCORRECT.
so if we pick any fruit from any basket we will be in a state as below:
we can pick from any container so let's pick from container 1.

pick from 1: 'A' apple
2 container can have either orange or mixed but as the label shows it is mixed it must be anything other than mixed(remember all labels are incorrect).We already know that 1 container has apple so we are left out with orange.So second container is orange and in the 3 container it will be mixed.

- aka March 31, 2013 | Flag
Comment hidden because of low score. Click to expand.
3
of 3 vote

Symmetry argument. Since Apples are Oranges are similar, pick the one labelled mixed. Simple :-)

- Anonymous March 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

+1

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

'A' apple
'O' orange
'M' mixed

pick a fruit f from 'M'

if f is apple
label 'M' apple
label 'A' orange
label 'O' mixed
else if f is orange
label 'M' orange
label 'O' apple
label 'A' mixed

- zhangyong309 March 29, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1) Select a fruit from Mixed basket 'M'
2) if (fruit == Apple(A))
	then
		change basket Mixed(M) to Apple(A)
		change basket Apple(A) to Orange(O)
		change basket Orange(O) to Mixed(M)
	end
else
	then
		change basket Mixed(M) to Orange(O)
		change basket Orange(O) to Apple(A)
		change basket Apple(A) to Mixed(M)
	end
end

- karpagaganesh March 07, 2014 | 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