I have had many people with 3-5 years of 'experience' developing not know how to find the smallest element in an array. Initially I was thinking it would be a quick check to see if people thought about null values, but apparently this is a hard problem...
Now they might have been useful for something, but I suspect they are just playing the numbers game and showing up to a lot of interviews until they get in. So even if say 5% of coders are useless that 5% is vastly over inflated in the interview process.
I think it is interview paralysis. They can't believe an interview answer is ever supposed to be O(n). I've had it happen to me where I get tripped up on relatively easy problems because the initial easy solution I came up with wasn't sufficiently clever and magically log n or some such thing.
I can't believe it's just interview paralysis to be honest. I've had people try and solve problems like that with 3 nested loops. Completely failing to come up with a working solution after 20 minutes.
I've been in situations where those kind of people have been hired too. Their code tends to be quite bad...
Any suggestions for dealing with this? I try and keep things as relaxed as possible to start with and make it clear that trivia and syntax is not what I am going after.
I would walk out of the room, but I am happy to walk someone though most of a problem they are not getting. The goal is going from an understood problem to actual code.
In addition to the obvious have the person walk you through what they are going to do try rewording it slightly. In this case ask for the max value.
Maybe they are nervous and focused too much on the minimum part of this that they lose sight of what they are trying to solve for. But be careful not to spoon feed it to them.
Now they might have been useful for something, but I suspect they are just playing the numbers game and showing up to a lot of interviews until they get in. So even if say 5% of coders are useless that 5% is vastly over inflated in the interview process.