Amazon Interview Question for Software Engineer / Developers






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

It's obviously A, look

In the first race A runs 100m while B runs 90m,

in the second race this puts A at meter 90 when B is at meter 90, because A is faster (from the first race) he will run that last 10m faster than B, so be will lose on meter 99.

- Anonymous December 23, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 0 vote

I guess its simple question
for every 10m distance A covers B cover 9. So if A runs 110m(100 + 10) B will run 99 (90 + 9)

So A will win for sure

- Anonymous December 21, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

In the second scenario A has to cover 110 metres and B has to cover 100 metres only.
So by using simple arithmetic :
when A covers 100m --- B covers 90 m
when A covers 109.99m ---- B covers x m

If this x is greater than 100 then B wins other wise A wins

- abhimanipal April 11, 2010 | Flag
Comment hidden because of low score. Click to expand.
1
of 0 vote

why another race? Just let them keep running after A reached the finish line, and stop them until A ran another 10m, and see if B reached the finish line or not. B will be 1m from the finish line, so A still wins.

- Anonymous January 02, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

we can infer that B runs at 0.9A speed.

now, with the 110 m race, time to finish is 110/A Vs 100/0.9A. A wins!

- Lucy April 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

A wins the race
as speed of A = 100/t at time t
speed of B = 90/t

time taken by A = 110/100*t = 1.1t
time taken by B = 100/90*t = 1.11t

- rishikantku June 02, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

According to the problem, A and B run at constant speed doesn't imply that A and B run at same speed!! It means each of them run at their own speeds constantly.

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

A is the winner in the second race also

From first race, time taken by both rabbits is same. Let S1 & S 2 be the speed of two rabbits respectively

Hence 100/s1 = 90/s2 -> s1 = 10s2/9

In the second race, A takes time t1 = 110/s1 = 99/s2

B takes time t2 = 100/s2

Obviously t1<t2 and hence A is the winner

- Nachiketha January 06, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Race 1 inference:

Speed of A/Speed of B = 10/9

Race 2:

Distance for A/Distance for B = 11/10

10/9 > 11/10. So A will win.

Please correct if am wrong.

- Balaji February 28, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

With every 100m run by A, it gains 10m over B. So when A runs 100m(ie. 90m over start line),it would catch up with B. So, then onwards, A will definitely win as he is faster of the two.

- Spec March 09, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For every 100m A covers, b covers only 90m =>wHEN A covers 110m, B covers 99m. (still 1m less than 100m), So, A wins the second race too. ;)

- Kiran April 04, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

All you people wrote craps/duplicates without going through the very first solution which is clear and perfect.

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

Perfect to you but not to me.

- Bullocks January 01, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@seema, don't criticize others, ppl may not be as brilliant as u .. respect others views/opinions

- Anonymous April 06, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Anon: criticism can be a good thing.

@seema. Did you even bother to read all the solutions? At least try to understand what others write before claiming it is crap. You have only added to the crap.


One of those solutions (give by two different people) is particularly clear (and perfect):

1) A is faster than B
2) When A runs 100m, B has run 90m and at that point they are at the same spot in the second race. Now, since A is faster, he wins.

- Anonymous April 07, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

kitne log desi hain yahan

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

sab desi hai bhai...

- nagabhushana.s July 02, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

ha ha ha.. nice one..

- Anonymous April 24, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

In the first race A and B reached 100m and 90m respectively, say in time T. In the second race, the only difference is that A starts 10m behind. So by simple geometric translation, in the same time T, A will reach 90m, same as B. So now A and B will race the last 10m from the same point. But A will win because A's speed is greater, as demonstrated by the first race.

- Bullocks January 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Without calculating any value,
1. A's speed > B's speed.
2. Giving 10 mt start means, Giving a chance for B to complete with him.

For that extra 10 mt, A's speed is more that B's speed, hence A will win.

- Ankush Bindlish May 05, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A very quick way to analyse is ratio of speed is 10/9 (this has to be same .. else question will be invalidated)

in second case ratio od distances is 11/10

now a 10/9 > 11/10 (need not calculate)
as n+1/n > n+2/n+1

- Amit Priyadarshi July 25, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

From the given data A could cover 100 meters in the same time B could cover 90m only. Consider the same in the second raise also. With the same speed, A and B will be at same position i.e 90m in the second raise also.. Obviously A is faster and he will finish the rest 10m first.

- Sani October 31, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 0 vote

Why can't it be B? Without analyzing data (as the problem says), both the rabbits run at constant speed. If A starts behind by 10m, and A and B run at constant speed, shouldn't B be the winner this time? Thoughts?

- Anonymous December 23, 2008 | 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