The Problem
Here's an interesting interview question I thought of on my way home from a party recently.
- You are parked at some starting point
SPwhich is between 2 exitsE1 and E2 - We were at a cross road with Road 1
R1at ourSP - Our starting point is set between exit 1 and exit 2 on the highway
E1 and E2of road 2R2 - To reach our destination we must reach exit 4
E4which is pastE2 - Speed limit of
R1= 25,R2= 50 (double)
??? When will going to E1 be faster ???
From SP at which distance is it faster to go back to E1 instead of going forward to E2.
The Solution
Note that:
D1 = D3 - D2(i.e. D2 is always a shorter distance)D2andD1both have the same speed (R1),D3is double ( or .5 the distance )- Since
R2is 2x the speed ofR1it will take half as long to travel - If
S1is closer than half way thenD1will always be faster thanD3alone. Meaning the faster route is determined before the car arrives atE1 - In the same vein, for
E1to be faster the car needs to arrive before it would have reached1/2 * D3) - Since they travel at the same speed if
S1if 1/4 of the way betweenE1andE2, and it would reachE1at the same time that it would reach1/2 * D3(i.e.< 1/4 of D3)
In Conclusion
Its about how the interviewee answers the question, not the answer they give.
So, take note of the interviewees thought process while solving the problem.
Remember: The question is better when you word it like I did.
Do not say Which route is faster.
That is not the question, it is When is going backward faster.
This will force the interviewee to use a logical thought instead of a geometrical.