Amazon Interview Question
Software Engineer / DevelopersChris, are you sure this was the question asked or something is missing in the question. If its that simple why have you taken the burden of putting it on the forum. Answer should be none other than the one in the first reply. Cirus, if you are sure of your answer could you please tell how you reached to that conclusion.
reduction of speed needs acceleration/deceleration so it should be something like (2km/hr)/hr. I think the question is incomplete.
CareerSavvy is wrong.
100 --> 98 (after 2 hrs) --> 96 (after 4 hrs) --> 95 (after the 5th hour).
Answer: 95 mph.
I guess careersavvy is right if the actual intent of the question is "what is the speed(average) at which the car travelled for 5 hrs? then the answer is (100+98+96+94+92)/5
[Total Distance/Time]
which comes to 96kmph.
But if the question meant what would be the speed after 5hrs,it is 90kmph since the speed falls from 92 to 90 immediately after 5hrs.
Answers is 96 km/hr after 5 hrs.
100km/hr--->98km/hr(after 2hrs)---->96 km/hr(2 hrs)--->4hrs completed.
it continues at 96 km/hr another 2 hrs... so at 5th he its speed is 96 km/hr
90 km/hr. or am I missing something here ?
- Anonymous February 22, 2010