Amazon Kalido Interview Question for Software Engineer / Developers

• 0

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

Pick one fruit from the box labeled "Apples and Oranges". Whichever fruit comes out will be the only fruit in that box. So if you pick an apple from it, the box actually contains all apples. The box labeled "Oranges" will have both apples and oranges and the one originally named "Apples" will have both kinds of fruit.

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

what if only 2 baskets are wrongly labelled and one is correctly labelled?

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

Take something from Orange/Apple
If it's an Orange:
- Orange/Apple -> Orange
- Apple -> Orange/Apple (it can't be Apple or Orange)
- Orange -> Apple (what's left)
Similarly for an Apple:
- Orange/Apple -> Apple
- Orange -> Orange/Apple
- Apple -> Orange

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

Good one

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

If it's an Orange, the Apple bucket can be Orange also. we can't surely say that it is Orange/Apple

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

take a fruit from (box1)orange/apple -> let it be orange.. as it is wrongly labeled it can never be orange/apple. So it is Orange.
so the remaining two boxes (box1 and box2) can be either orange/apple or apple.
The apple box (say box2) can never be apple itself as it must be wrongly labeled. So it is Orange/apple. So the final box (box3) will be apple... I hope its clear.. :)

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

So this will take one 1 try to figure out which basket which product.

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

neo..u r wrong......the box labeled "oranges" will have only Apples

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

Since all boxes as mislabelled below is the probability...

Box labelled A + O can contain "A" or "O"
Box labelled O can contain "A" or "A+O"
Box labelled A can contain "O" or "A+O"

If you pick "A" from box labelled A+O,

Box labelled A + O, contains "A"
Box labelled O, contains "A+O"
Box labelled A, contains "O"

If you pick "O" from box labelled A+O,

Box labelled A + O contains "O"
Box labelled O contains "A"
Box labelled A contains "A+O"

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

I think there is a possibility for label being correct..In that case this will not work..

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

it said ALL labels are mislabeled.. so no possibility for label being correct in the first place

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

nice solution!!

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

nice explaination chandu!!

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

'

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

and 1=

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

' and 1=

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

\'

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

'''

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

ookjk85h74

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

1 OR 1=1

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

1' OR '1'='1

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

1'1

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

' 1 AND 1=1

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

1 AND 1=1

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

1\'1

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

) or ('1'='1--

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

' or 1=1/*

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

' or 1=1--

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

order by 1000/*

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

order by 1000;--

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

' order by 1000/*

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

' order by 1000;--

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

' or 1=1--

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

" or 1=1--

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

') or ('a'='a

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

'

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

and 1=

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

' and 1=

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

\'

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

'''

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

ookjk85h74

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

1 OR 1=1

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

1' OR '1'='1

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

1'1

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

' 1 AND 1=1

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

1 AND 1=1

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

1\'1

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

) or ('1'='1--

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

' or 1=1/*

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

' or 1=1--

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

order by 1000/*

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

order by 1000;--

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

' order by 1000/*

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

' order by 1000;--

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

' or 1=1--

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

" or 1=1--

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

') or ('a'='a

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

You open the basket that's labeled Apples and oranges. Lets say you remove an apple from that basket, then that implies that the box contains apples.
Similarly you can find the other boxes and get the answer as 2 ways i think.

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.