Ask HN: Tips for Memorizing Code?
My DSA class requires I memorize both algorithms and code for algorithms. While it's my understanding that memorizing algorithms is where I should put most of my effort, I lost a substantial amount of points on last semester's final for not knowing code (even when I knew the corresponding algorithm). Does anyone have any techniques to memorize code?
2 comments
[ 4.3 ms ] story [ 17.4 ms ] threadIf you have a solid understanding of what the algorithm does and how it does it, then it becomes trivially easy to memorize the corresponding code, or just rewrite it from scratch, because you know what it's meant to be doing.
Also spaced repetition, come back to it every few days until you've got it all down.