The point isn't memorizing, it's understanding. If you don't understand, memorizing will only get you so far.
So really, you do need to memorize stuff. Maybe not questions per se, but certainly patterns and techniques (on top of understanding the fundamentals)
Understanding is the hard part, the implementation should be the automatic part. I mean, we're programmers, right? We know how to shuffle arrays around and return values from functions.