The college I attended didn’t focus too much on algorithms and data structures, but did include some of the basic stuff. That was 20+ years ago…and not only have I not memorized it, I haven’t used much of that in last dozen+ years as a corporate programmer, nor in much of my side projects. And there’s a good chance that there’s a library that can do it better than anything you can reinvent from scratch.
Coding assignments shouldn’t be based on having someone on the spot, to write something off the top of their head, that anyone can google.
A good coding assignment should reveal how the candidate’s thinking process works. How do they approach solving the problem, how well their code is structured, attention to naming, which standards do they adopt, the code’s readability, and how consistent they are. Is it unit tested, or at least factored to be testable? Is it chicken scratch that will fall and apart in under 2 years?
Of their mistakes, do they still have redeeming qualities? Do their strengths outshine their weaknesses, and can their weaknesses be worked on?