Amazon Interview Question for Software Engineer / Developers






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

This has become a classic, referred to as the Monty Hall problem.

- LOLer July 16, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is a classic probability question.
You always switch.

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

http://en.wikipedia.org/wiki/Monty_Hall_problem

- idea July 16, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

LOL. I guess I wasn't clear enough...

- LOLer July 17, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

you certainly dont have anything better to do this summer..do ya?

- MJ July 22, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nice! Your logical deduction skills seem to be as good as your programming skills.

- LOLer July 23, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

1/3 if you don't go for a switch and 2/3 if you go for the switch. The probablity increases when you always go for the switch.

- Ganesh M July 20, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

precise answer from ganesh..though all of you are right...this the famous Monty-Hall-Problem...

- desiNerd July 21, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This question comes in the movie 21 where he gets bonus points for getting the answer right which is to switch and the problem is of conditional probability

- AvatarAang July 25, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

No. The move 21 borrowed it from elsewhere.

- Anonymous July 25, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

the original movie is Rounders

- alfa December 25, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

you have to swicth for 2/3 posibilities
initially all doors have 1/3 posibility,
aft u select the unopen door have 2/3 posibility....

......... any Wrong?

- Dinakaran.A GCT July 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nothing wrong, looks right...

- LOLer July 30, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

both of you are right...

- LLOLer August 05, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think the answer is 50/50.
After you have already selected a door, the host opens one door which does not have the prize. So now, Out of the 2 doors which are closed, one has the prize, one doesn't.
So your chance of winning if you switch is 1/2.

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

The rest are idiots. No?

- MJ August 15, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

as if you are the creator of the problem ... what was your answer before reading the wiki genius ???

- Anonymous August 21, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Huh? At least read the other solutions before posting something. If you don't want to 'look', you are free to do so, but avoid posting unless you have something new to add, or need to ask a clarfication/new question.

Especially do so, when the majority of the other posts disagree with what you are about to write.

If everyone just keeps adding crappy "me thinks..." posts, there will be too much noise and too little information. Capisce?

Idiot.

- MJ August 22, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The answers is
If I choose to switch chances of winning is : 66.6%
If I go with not switching the cahnces of winning is : 33.3%
It is all depond upon variable change...
when initially they offer me to choose one of the door the chances are 33.3%
when he opens one door chances are 66.6% when make a switch.

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

shwemo
is that what you gathered from this thread? just repeating unnecessarily what others have already proposed.

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

shwemo
is that what you gathered from this thread? just repeating unnecessarily what others have already proposed.

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

There are three boxes with two empty and one with some gift.
So considering above,
Selection of one empty box is 2/3 out of 3 boxes.
1. So suppose person selected the gift packed box out of three (which is only one out of three, 1/3 probability) and then host opens the empty box. In this case, if person choose the other box, he/she will get empty box.
2. Now, probability of choosing empty box by person is 2/3 and if suppose person choose an empty box and host opens another empty box, then switching to last unopened box will be gift packed.

So to conclude switching of box will always give person the maximum probability to win i.e. 2/3. There will be two cases, in which person can choose empty box, and switching will help him to get gift packed box and on the other hand, there is only one possibility to choose gift packed box and only one case, which could upset the person

- shashi.nitw November 16, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The issue here is that we do not necessarily know if the host's behavior is a one-off stunt or a consistent tradition.

If we assume that every night the show runs the host ALWAYS opens a door with a goat (choosing the goat uniformly at random if the player has guessed the correct door), then the answer is that switching does double one's chance of winning.

If we fail to make that assumption, we cannot answer the question. Suppose the host only opens another door when the player has chosen the correct door. For all we know, maybe that's what he does! But then the answer is obviously different.

Nasty problem, must clarify assumptions. The "Three Prisoners Problem" is more clearly formulated.

- mathytime September 22, 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