The on-the-spot problem solving is in my opinion not at all linked to if you know the puzzle. If you can explain your approach to solve difficult stuff thats new to you it does not matter if you know the question.
If you want to test someone if he/she can solve this problem it is relevant. But thats often not the riddle to solve in a coding example.
Was about to say this exact thing. Being able to explain how something works means you understand it. Simply knowing the solution doesn't help.
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.