This is the

solution to

problem 12 on the

**hard interview questions** node. If you have not read the

question, the

following will make no

sense to you:

The best way to think about this problem is to consider it from the perspective of the wife. Her round trip was decreased by 20 minutes, which means each leg of her trip was decreased by 10 minutes. Thus, she met Joe 10 minutes earlier than she usually does (6:00), so she meets him at 5:50. Since Joe started walking at 5:00, he must have been walking for 50 minutes.

Here's another way to look at it: notice that we didn't specify any of the distances, including how far away Joe's house is from the train station. So let's try examining a degenerate case, say, where Joe lives at the train station. But this doesn't make much sense, because his wife's round trip can't decrease by 20 minutes if it is already zero. So the *real* degenerate case is when Joe's wife normally has to drive 10 minutes to get to the train station, and thus her round trip is 20 minutes less, i.e., zero minutes in the case. This means that John meets her at home just as she is about to leave. What time does she normally leave? At 5:50, so she can get to the train station at 6:00. Thus Joe must have been walking for 50 minutes to arrive home at 5:50.