If they were just out of school and currently unemployed with no dependents, sure. Otherwise, memorizing answers to homework assignments from an intermediate algorithms course seems like a poor way to spend significant time for someone whose job/career does not actually involve repeatedly implementing well-studied low-level algorithms from scratch on a tight deadline with no ability to look up reference materials.
Maybe not. Wouldn't you prefer a candidate who did prep work before an interview rather that one who chose to wing it?