Funny, I also fired textmate and started solving the problem in C :-)
It took me around 20 minutes to write all the extra code and 9 to write the reverse function (including the testing and all).
The problem was not knowing how to solve it but more the pressure of looking at the clock and seeing the time flying away. Because of that, some minor mistakes were done and naturally you start to get nervous and waste more time. In a phone interview I would probably even do more minor mistakes and fail it.