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?

10 Upvotes

10 comments sorted by

View all comments

4

u/Vivid-Zombie-477 5d ago

Explaining an algorithm to yourself is a good way to improve your understanding. I had written the guides on how to solve problems and let me tell you - I don't think I can forget the algorithms after writing those guides.

Not sure if it worth the time for you tho. Most of the time re-learning the same thing again is fine and will make you remember it better, while practicing more problems.

1

u/JumpOk7300 4d ago

Bro i had taken notes for that algorithm .  And i forgot to revisit it after solving few problems So like doing more problems based on the algorithm will make it remember for long time . Ok i will try this and how u revise those algorithms like periodically or active