Interview puzzles are so hit-or-miss. No matter how many of them I solve, I always stutter when I'm faced with a new one. If the problem is new, it either "clicks" right away or I bomb the interview. No middle ground. It may helpful to consider that the current interview system is, literally, designed to make you fail. That is to say: not with 100% certainty -- and on some level, they want at least some of the candid…
It literally is not your fault. As a reward for that realization, pay it forward and don't hurt other people.