Every interview is "Demonstrate you meet the hiring criterion, get $XYX/year". It's not as if I reject everyone who doesn't arrive at the perfect solution, but I do need to get some signal that even if they don't get to it that they're thinking about the problem in a productive way. Trying to do a problem one way and then adjusting when you realize it may not be a good way to solve it is a common and important thing that happens to most engineers regularly. Soliciting or synthesizing advice from your peers is a bit part of it as well. Obviously an interview isn't a normal "we're working together on a team" environment, which is why I'm musing about how best to provide advice and guidance without making an already stressful situation worse.
I don't just reject people who give a sub-optimal solution, but going down those unfruitful paths of solving the problem often leads to situations where they stymied and just staring at the problem trying to work out how to work around what have become larger and larger issues with that approach. At that point, I'd either want them to recognize the issue and try another approach, or ask me for advice, or accept my nudge to find another path.
It's a problem I like to give because it's a problem that's easy to demonstrate your baseline skill at and get out a simple working solution, and then we can spend the rest of the time improving and optimizing.
I don't just reject people who give a sub-optimal solution, but going down those unfruitful paths of solving the problem often leads to situations where they stymied and just staring at the problem trying to work out how to work around what have become larger and larger issues with that approach. At that point, I'd either want them to recognize the issue and try another approach, or ask me for advice, or accept my nudge to find another path.
It's a problem I like to give because it's a problem that's easy to demonstrate your baseline skill at and get out a simple working solution, and then we can spend the rest of the time improving and optimizing.