Thanks A-Frame for your response.
Depending on the level you are interviewing for, Google has expectation bars to be met. Google is not the place to “learn” programming. We expect you to have a certain level of competence right away. It’s not uncommon for PhDs to join as mid level L4 engineers.
As an interviewer and/or hiring committee member, my job is to ensure the manager doesn’t end up hiring a low performing candidate that can sap a team’s productivity for a year or more. It’s happened to me. It’s not fun.
I think your own experiences may be clouding your projection of my article. I specifically don’t like gotcha questions. The point of my question is to extract as much information as possible about how complete a programmer you are in 45 minutes or less using the simplest question possible.
While a for loop is the minimal solution, it’s only acceptable for very young interns. Any programmer worth their salt will know why the for loop is insufficient. We live in an era of big data now. I shouldn’t have to explain this. In fact, I expect the candidate to lead that conversation.
If a candidate writes sloppy code or is unable to debug a binary search, they are not going to be ready for Google, and potentially many other employers. No problem. Go get more experience. You can always come back and interview again later.