Microsoft Interview Question: 1. Tell us about yourself and... | Glassdoor

Interview Question

Software Developer Interview(Student Candidate)

1. Tell us about yourself and your work experience. 2. What

  was the longest and the most complicated code you have ever written. 3. If there are 3 baskets, having contents: Apples, Oranges and Apples + Oranges. All the baskets are mislabelled and not transparent. How many minimum baskets do you need to open to know the contents of all.
Answer

Interview Answer

2 Answers

0

Ans to 3. 1 Basket

Interview Candidate on Feb 5, 2014
0

Answer 3: 1 Basket.
For any condition: Open any one basket. Lets say we open the basket labeled as Apples+Oranges(A+O) and we find apples in it.
Now just peel off and replace the A+O label from this basket
and with the apples label from the basket labeled as apples. Now we have eliminated the apples basket.
We know that the labels are incorrect and we have two baskets left with us. Just interchange their labels and you will have the correct labels.

Shrey Hatle on Feb 14, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.