we've had foreign job candidates with masters degrees in CS from top 50 schools who couldn't pass a simple programming test or who couldn't answer some basic CS questions on O(n) or whatnot.
I'm not talking sadistic google interview questions, these were things that anyone with a BS should be able to answer.
That has happened to me so many times that my last company shreds resumes from foreign students with a prestigious American masters where the undergrad is not similarly prestigious (eg IIT and Tsinghua are good, but not many other schools).
India has a population of well over a billion people. IITs admit only about 5000 students per academic year, from about 100K students applying, across all disciplines. If you find all other students from India not qualified, maybe there is something seriously wrong with your candidate outreach, or you hire from a very exclusive pool even stateside.
That's true, but having seen (non-IIT) Indian colleges, I am not surprised if 80%+ students they see are like that. Moreover, intelligent ones less commonly opt for masters degrees because they get good offers in campus placements, especially those from middle class or rural areas are already doing undergrad on loans.
We did only hire from about 20 schools in the US. The unfortunate thing is that the masters programs did not filter nearly as exclusively as the undergrad programs.
for "top 50 schools", what "top 50" are you implying? top 50 worldwide? top 50 us? or top 50 in their own foreign country?
As a sidenote: a lot of CS/Software Engineering graduates with a bachelor in my own country (Italy) can't pass simple programming tests, because most of the education is (too?) focused on theoretical aspects, and most of the time people is tested with non-practical exams.
I'm not talking sadistic google interview questions, these were things that anyone with a BS should be able to answer.