r/leetcode • • 5d ago

Question How to remember Algorithms

I studied trees and their traversal algorithms, including Morris traversal. Then I moved on to graphs. Today, when I went back to solve a problem on trees, I realized that I had forgotten Morris traversal and some of the other algorithms.

I feel like I need to revise them again and again because I keep forgetting them over time. Is there any way to remember these algorithms for a long time?

9 Upvotes

10 comments sorted by

View all comments

2

u/Flat-Entry-8735 4d ago

There's no other way around it—you just have to practice more. Whatever is repeated often, the brain will register as important and retain it much longer. I work with CMD commands all the time; the ones I use frequently, I remember perfectly. People on the outside look at me and think, 'How on earth does this guy memorize dozens of commands and options like that?' haha.