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.