Making sure you can walk through and explain every step of a homework problem ain't a bad idea. If I struggle with an exercise, I try to go back to it and make sure I can do it without looking at the solution. A step further would be getting ALL the exercises to the point where you can reproduce the solution (and, again, explain the logic) quite quickly.
It's possible that this sort of thing is what your classmate actually means by memorizing the answers. If you're doing a lot of exercises this approach could take a ton of time, and you may see diminishing returns for the effort you put forth, but it's not an awful thing to do. Perhaps doing that but only with the hardest problems or the ones with the weirdest solutions would be a good approach! A step further than that is literally memorizing each step so you can reproduce them without thought. That would be a waste of time if you can already solve the exercises quickly with some thinking it through, IMO.
Literally memorizing the *solution*, as in just the final step of an exercise, isn't the way. If *that* is what your classmate is doing I would guess that spending extra time with the work might be helping him out, but that actually memorizing the answer isn't the key. Or he might have a natural facility for the stuff ya'll are working on, and this extra effort is a waste of time, but he thinks it's helping. But I'm *guessing* he's doing something more like I described above. Maybe you know?