It definitely can, but I've been asking one of my questions for almost a decade at this point, and I've seen nearly every attempt at a solution that anyone would come up with. Often the difficulty is that the candidate is working towards something that may be a possible solution, but has a myriad of edge cases that they're going to discover and end up needing to spend far too long trying to work out. Meanwhile, there's a much easier solution they could do instead.
I'm not sure of a good way to re-target someone in that situation. I have let a candidate just go down that line before because they were making swift progress on it, and I gave them pretty good marks at the end for an incomplete solution that I was pretty sure they could have worked out eventually, but for other people it's much harder. I totally sympathize with the disruption of an interviewer essentially telling you "not like that" when you're frantically trying to come up with a quick and workable solution, but at the same time, you're probably not going to make yourself look good if you're putting together an increasingly obviously unviable solution by bolting on more and more logic as you find holes.
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'm not sure of a good way to re-target someone in that situation. I have let a candidate just go down that line before because they were making swift progress on it, and I gave them pretty good marks at the end for an incomplete solution that I was pretty sure they could have worked out eventually, but for other people it's much harder. I totally sympathize with the disruption of an interviewer essentially telling you "not like that" when you're frantically trying to come up with a quick and workable solution, but at the same time, you're probably not going to make yourself look good if you're putting together an increasingly obviously unviable solution by bolting on more and more logic as you find holes.