Memorising Leetcode by using Anki as a Scheduler
Problem: When you have to do Leetcode, you often cram it all in a few weeks before your coding interivew.
It sucks. The interviewer knows it sucks. But there's nothing that can be done.
Everyone knows cramming leads to worse retention, and you do not really "grok" it.
Everyone knows that you should always be at Leetcode-level, but sometimes you get stuck on a project doing YAML for 2+ years and forget that Python dictionaries require colons (this was me... today...)
My solution:
Do Grind75, but use Anki as a scheduling algorithm.
Don't click off!
Let's break this down.
What is Grind75?
On perhaps one of the worst forums to exist on the internet (second to 4chan), a great software engineer created a list of 75 Leetcode problems he thought were essential.
He said:
All Leetcode problems are broken down into patterns. And these 75 questions will show you all the patterns.
Learn the patterns, and you will be able to conquer the fire nation.
This list is called the Blind75, as it appeared on Blind.
And then it was such a hit he thought "Hey, I can turn this into something!"
So he built The Tech Interview Handbook™️
And more specifically, he built Grind75. This time no longer tied to that horrible forum!
Now you can customise it to how many hours you want to do.
Then along came the Neet75, the Grind150, The Neet150, the Neet300, the CSMajors450, the Leetcode500 and blah blah blah. At that point just do the whole site 💀
But the principle remains the same.
Learn the patterns in the questions by grinding them, and you will be able to solve 90% of all Leetcodes.
People would grind these questions before an interview. But that led to poor retention of patterns, unintuitive knowledge and often people would just copy and paste and pretend like they've never seen the question before.
Heck, when I interviewed at Cisco I had a Leetcode question I had done that morning! I then spent the next 30 minutes "coming up" with the answer instead of pretending I had memorised it.
So, how do we learn deeply these questions and memorise the patterns?
Use them a lot.
Ok.... but be real... Literally no one has ever used the Tortoise and Hare algorithm in real life.
So the next best thing... use Anki!
What is Anki?
Anki is the love of my life.
Anki is a spaced repetition program designed to make you memorise things.
If you have ever used flashcards, well.... it's digital flashcards.
Anki is so good, it truly is one of my favourite pieces of software.
I know a guy named blt who loves Anki so much he spends all his free time away from Anki making gifs about his love for Anki.
I'm not joking.

Or this one:

He has made over 371 gifs about Anki. I counted.
blt, get some help! Anyway... back to the article!
It works like this:
- Make a flashcard
- Do the flashcard
- Rate it good or bad depending on how well you remembered it
- Anki's algorithm (which is currently the best in the world) will predict when you are likely to forget it, and prompt you just before you do forget it.
We want to take advantage of is (3), using Anki to schedule things.
Anki with Leetcode
I downloaded this pre-made Anki deck of the Neet150:
The front of the card looks like this:

When I see this, I do the Leetcode question.
If I get the question right, I pass the card else I fail the card.
This way I am scheduling Leetcode inside of Anki, to never forget the patterns used.
Because the question itself is not in Anki, I can solve it slightly differently each time. This means I memorise the pattern and not necessarily the solution (although by the nature of Leetcode, the solution will always be roughly the same).
This also has some benefits:
- Leetcodes which are very easy get pushed very far out, so I almost never do easy Leetcodes like twosum
- Harder leetcodes have a tighter schedule. I will see them often. This means I work on what I am worst at the most.
- I do not need to worry about creating a schedule to be "ready" for an interview. Anki handles the schedule for me, all I need to do is my cards.
- If I do need to worry about (3), Anki has a document on preparing for a large exam which I could use in the future to help plan for an interview.
- Anki schedules the least amount of work for me to learn this. before I was cramming all day to try to learn this, but with Anki it knows what I know / don't know and correctly schedules the least amount of work each day to maximise my gains.
PS: I use the card type to add other Leetcode questions in.
In terms of settings:

I let FSRS handle relearning + learning steps, as I find intraday steps to be annoying for Leetcode, and fsrs does not really schedule intraday for me.
I also have low desired retention (fsrs suggests 90%) because I do not want to be doing Leetcode all the time 😜
Leetcode cards are not "flash" cards, they are slow cards. I know I will simply not do them if I see them too often. Doing anything at all is better than ignoring this completely.
Therefore I only do 1 new every so often (I am not currently interviewing), and make sure my reviews are very well spaced.
Scheduling for other things
You can use Anki as a scheduler for many other things outside of Anki.
Examples include:
- Revision materials that can't be easily turned into flashcards (for example, physical examinations)
- Other online tests like the CKA exam (so long as you can break it down into 1 question per card I guess)
- Chess challenges on websites like chess.com that do not support SRS
- TryHackMe / HackTheBox challenges
- Really any website where you need to memorise something, but it does not support SRS.
Tips: Do not treat these like flashcards.

Make a new preset like above, and set all settings to space them out much more.
Flashcards normally take 3 - 5 seconds to do.
These are slowcards, they take 30+ minutes to do.
Do not treat them the same!