Remembering stuff is important, but in an interview, all I expect is that the candidate can remember what they discussed 10-20 minutes ago (in the same interview), and that they use a credible looking syntax that's self-consistent; and that they can explain anything they wrote.
I also give a problem that doesn't use a lot of library functions.
I also give a problem that doesn't use a lot of library functions.