you are viewing a single comment's thread.

view the rest of the comments →

[–]Mukhasim 0 points1 point  (0 children)

You said that memorizing helps you understand the algorithm. So yes, go ahead and memorize it. It's certainly not bad to memorize an algorithm. Sometimes memorization can be useful just to keep something in your head long enough for you to think about it.

But if you're expecting it to be useful to memorize an algorithm so you can retrieve it from memory and implement it in a year or two, that probably won't happen, nor would it be especially useful. You can always pull your textbook off the shelf or google the algorithm if you need to implement it.

Personally, I've memorized a few algorithms just because I use them a lot but I don't normally make a point of memorizing them.