Right. It's an interview - artificial by definition, not meant to be perfect; in fact perfection in hiring (or in anything) is unachievable - we aim for the "good enough".
> Often I have to talk to many people, including non-programmers, to cover all angles of a hard problem.
Here we are - me and my colleague - there to answer questions, reflect on your thoughts, etc. Talk to us, that's exactly what I expect. Not just to give solutions, but to clarify the problem (for you and for us). Make us understand how you're looking at it - we'll also share our perspective and see if we can come up with something together.
Is this really something that you don't see happening, in practice?
1. It's easy enough so you can talk and explain while solving it.
2. It can show your ability to split problems into smaller subproblems.
3. It maybe filters people that just memorize a bunch of solutions, since it's open how exactly you solve it.
You just have to learn and remember some obscure algorithm to solve them. That just filter for "unexperienced" people that have enough time to actually learn a lot of algorithms by heart.
I.e. that would be fresh graduates. But then you could just look at their uni grades, if you want people who are good at learning.
Which is why I said I don't expect them to solve the problem, I'm interested to see:
- the general thought process - whether the candidate is inclined to jump at the solution or clarify the problem (neither approach is "disqualifying", btw! but for a senior position I do kinda' expect the candidate to recognize when a specification is incomplete, and I will provide increasingly ambiguous problems/questions to see when he stops making assumptions) - that the candidate is capable to identify some "leads"/ subproblems that need to be solved first/ to reduce the problem to a different one/ etc.
> But then you could just look at their uni grades, if you want people who are good at learning.
If only it was so simple... some people are good at learning, they just don't have good grades (e.g. they have to work to support themselves and don't care much about some grades); while others are good at getting generally good grades without actually being good learners (extreme example: cheaters).
These "hard interview problems" that must be solved through some artificially staged contemplation really are useful for two reasons:
* it's sadly the only way to quickly try to get a random reading of a person in a semi-standardized way while minimizing time commitment, kind of like fast food is the quickest way to fill oneself, and
* people who pass these at least demonstrate that they can drill/memorize or otherwise prepare for a challenging activity, which takes time and discipline, which in general are desirable characteristics
that's it, pretending like this in any way models real work or has any other benefits is not right.