The situation can go in the other hand as well if the interviewer asks you if you know how to solve the problem, and you say 'no' and proceed to implement it and find a hard time to explain, they probably will "catch" you cheating and this can put you in a bad situation. Personally, it happened to me that they asked if I knew the algorithm, I said 'yes' and still they asked for me to implement because the most important part of the algorithm is the discussion around optimizations, big O and alternative ways of doing that.
You should never answer, "Yes, I know how to solve this." That's almost never true. Even if you ask me to recreate code I wrote before, I can't for sure know I'll do it the exact same way, or not encounter difficulties.
A truthful answer can be, "I believe I can solve this."
The ability to explain what you're doing is critical. But I don't think it's tied to having an answer memorized or not.
You are right!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.