Amazon Interview Question


Country: India




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

I don't quite understand your question, can you elaborate a little bit?

- Vincent August 09, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Same here. This question needs to be A LOT clearer before I'll attempt to answer it. What does killing an animal have anything to do with it?

- eugene.yarovoi August 09, 2012 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

From my understanding of the question, if w and z are the lengths of the sides of the rectangle, the probability should be: 2/((w+1)*(z+1)), given that (x,y) can only be integer co-ordinates.

The idea behind this is simple. The total no. of integral co-ordinates in a rectangle of w,z dimensions are (w+1)*(z+1), including the end-points. Now, the guy can only fall of the island if hes on any one of those 4 points, and makes 2 wrong directions (for eg. west and north at the top left point) at each of these 4 points.

Thus, number of deathly moves= 4*2=8

Total number of possible moves= (w+1)*(z+1)*4, since at each point i can move in 4 directions.

Thus, probability of the guy dying is: 2/((w+1)*(z+1)).

- DeathEater August 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Although, I am not sure what code is expected here.

- DeathEater August 14, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Question is NOT clear... I repeat NOT CLEAR

- loveCoding August 09, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I didn't get you. Can you please repeat?

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

Sure I repeat
while(true){
Question is NOT clear
}
LOL

- loveCoding August 10, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

the question look intresting.. but the information given is not sufficient.. some1 please eleborate the question

- code_guru August 13, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

cud u pls explain the problem statement??

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

hey frndz i got the same ques....it wasnt clear to me too thought u guys can get it..

- pks August 11, 2012 | 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