My experience has been different. Usually the best thing to do is to write the naive approach first and then let the interviewer guide you towards what they think you could improve.
I'd rather have someone who could caveman the first approach, recognize the inefficiencies, and improve the execution than someone who rattles off a memorized algorithm to a common problem.
If the interviewer is wanting the eloquent solution right out of the gate, then the manager might be hiring for the wrong position.
OK, so you are just going to assume that any interview you can't pass is broken?
There have been interviews I have failed and instead of blaming the interviewers I took the time to actually study the problem I was given. This has helped me become a better programmer.
Implement -> Evaluate -> Refactor
I'd rather have someone who could caveman the first approach, recognize the inefficiencies, and improve the execution than someone who rattles off a memorized algorithm to a common problem.
If the interviewer is wanting the eloquent solution right out of the gate, then the manager might be hiring for the wrong position.