I hate code-writing puzzles during interviews. I don't use them at all. Why? Precisely because of methods such as this one where someone might memorize or learn a bunch of patterns to common puzzles going around. They come in and ace the interview test. Does it really tell you anything about the person other than they can train themselves like an intelligent monkey to produce the correct output given an input? My pre…
I accept that when you're programming "for real", you have reference books, Google, StackOverflow and all sorts of other resources to help you out, and I accounted for that. I wasn't picky about syntax. I let them use whatever programming language they were most comfortable with (as long as it wasn't something terribly obscure, like Brainfuck or J) I even accepted the occassional algorithmic error (e.g. greater-than/less-than being flipped around) if it was clear that the applicant knew what they were talking about and was quick to fix the error once it was pointed out to them. But I still insisted on some code. I would be willing to bet that the programmers who you are referring to -- the ones surrounded with reference books -- would be more than able to bang out something like a quicksort or a binary tree without references. Sure, it might not be a perfect, production-ready implementation, but I'd expect something that at least resembles the correct algorithm, along with a discussion of the tradeoffs and edge conditions.
Frankly, I think memorization is, if anything, underrated in computer science. Our access to knowledge is quite similar to the memory hierarchy in a computer. Working memory is like RAM. Long term memory is like disk. Books and references are like the network. Having algorithms and data structures memorized is like having a local cached copy of a network resource. It allows you to be faster and more fluent when you're programming because you're not context switching constantly as you look things up. And just like in sports or martial arts, it doesn't matter what advanced techniques you know if you don't have solid fundamentals. Basic algorithms and data structures are the fundamentals of programming. When I ask a candidate to demonstrate their knowledge of such by writing code on a whiteboard, I'm assessing how good their fundamentals are. The rest can be taught.
EDIT: And of course, I forgot the most important fundamental of all: Big-O notation. Knowing algorithms is useless if you don't have solid basis for determining how and why one algorithm is better than another.