I have interviewed dozens of engineering candidates. A big part of what I am looking for in an interview is how the candidate thinks, and what it's like to work with them in an interview.
If someone can't communicate well on technical matters, that's generally a negative.
That said, if a candidate was frank with me that they don't do well being put on the spot with a question like that, and can articulate how they do actually solve problems, and give examples of how it's worked for them in professional settings, I would consider them for the role if their answer was convincing.
I.e. if I asked you to explain how you would approach a problem, and you said you might need to go off and write some throwaway code to explore the edges of the problem that's a good answer.
If someone can't communicate well on technical matters, that's generally a negative.
That said, if a candidate was frank with me that they don't do well being put on the spot with a question like that, and can articulate how they do actually solve problems, and give examples of how it's worked for them in professional settings, I would consider them for the role if their answer was convincing.
I.e. if I asked you to explain how you would approach a problem, and you said you might need to go off and write some throwaway code to explore the edges of the problem that's a good answer.