Bloomberg LP Interview Question for Financial Software Developers

• 0

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".

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.

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 :-)

Comment hidden because of low score. Click to expand.
0

+1

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

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
end
else
then
end
end``````

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.

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.