I have written hundreds of thousands of lines of shipping code, and I've faced this kind of code-for-an-interview process repeatedly. The last time I had to do it, I found that I actually choked on a simple string reverse problem.
It was a really basic algorithm; there was absolutely no difficulty with my understanding of how the algorithm worked, or how to code it. I just choked. I was talking to three people on Skype with a shared whiteboard, and I had to give up. It was very frustrating. This had more to do with the fact that I had been out of work for several months and was facing a huge amount of stress about things like paying the mortgage than it did with my actual abilities on the job.
Forgive my skepticism, but I have been battle-hardened by some pretty bad horror stories.
I work at a Big 4, we see a lot of fresh graduates coming in every weeks or so.
To give you an idea of how bad it can be: a group of technical recruiters took the decision to "tweak" one of the interview questions we are asking during on-sites. They thought the change was benign when in fact it made the problem NP-hard, which is you know... pretty "tough" to solve under 45 minutes (or without a lab, a research team and 20 years). Of course, all of them were baffled by the fact that none of the candidates were performing well on this "trivial" question.
It took us three engineers, and two interviewees to make them acknowledge, and understand their mistake.
A big waste of time for everyone.
I am currently hiring and as part of the interview process, I ask a very straightforward question. I expect it to take on the order of 5 minutes and 7 lines of code. It is programming 101. Out of the 10 or so people I've interviewed, exactly none of them has gotten past this question. Most of them take 45 minutes to work on it and few of them get it to work even then. These are people who have contracted at big name places, with 10+ years of experience, with CS degrees, H1-B and non-H1-B.
So if I am going to hire someone who is unable to write a simple algorithm, I would rather do it at offshore prices. And sadly, that is something I am seriously considering doing.