Microsoft Interview Question for Software Engineer / Developers






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

Let guys be 1,2,3.

If 1 sees two black, he can guess.

If 1 passes, then if 2 sees 3 has black, he know he must have white.

So if 2 passes also, 3 knows that he has white.

- Anonymous August 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@anonymous what if person1 sees 1 w and 1 b hate can you explain in detail ur solution

- cunomad August 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

case1. If they have two black balls, the third will immediately know.
case2. they have picked one black and two white.
person1 sees one black and one white, he wont be sure and he will pass. the second one would come to know that the first has seen either both white or one white and one black. If he sees the third has black, he will come to know he has white. but if he sees white, he won't be sure of his color. And he will pass. Now the third one will know that the second has passed, means he has not seen black on my me. So he will be sure he has white.

case3. they picked all white
The first will not be sure and will pass. passing again means the first has seen either two white or one black. The second again can see two whites, so will not be sure if he has black or white. If he has seen any black, he would have sure he has white one. Again third one will be sure that he has not black, else the second would have known his color. So he will come to know his color

- neo August 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Possible View of Advisor 1, to make him pass the turn.
3 2 1
Case 1: W W
Case 2: W B
Case 3: B W

Possible View of Advisor 2, to make him pass the turn.
Case 3: 2 could easily find that he has W, that make 1 to pass the turn. This case is not possible.
Now 2 knows either it is B or W? Still Ambiguous.
3 2 1
Case 1: W W
Case 2: W B

Once, 1 and 2 pass, 3 is sure to have W from Case 1 and Case 2 above.

- Deepak Agarwal August 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

http://sites.google.com/site/mytechnicalcollection/puzzle/choose-adviser-from-3

- Deepak Agarwal August 27, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

http: //discuss.fogcreek.com/techinterview/default.asp?cmd=show&ixPost=629

The second last solution by capella is the clearest. Discusses all possible combos.

- Bandicoot March 07, 2010 | 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