Arjun Patel
Personal website and dumping ground for my technical notes.

Using Anki and spaced repetition with Leetcode

#bookmark

old.reddit.com (2022). "Using Anki and spaced repetition with leetcode : leetcode". Archived. Retrieved April 16, 2025.

What is Anki

Anki is a spaced repetition software that is famous among some learning communities, like language learners and med students.

There are many ways to use it for leetcode but I’ll try to explain a simple way that doesn’t require you to change the default app settings.

Step-by-step Guide

Our goal is not to design complex flashcards but to use Anki as a scheduler for solving leetcode problems.

Step 1

Create a card that has a link to a leetcode problem in the front. You don’t have to put anything on the back side.

Screenshot 1

Step 2

Click on the link and try to solve the problem. If your submission is accepted, click on “Easy” and move on.

Screenshot 2

As this is the first time you’re seeing the card, you will notice that clicking on “Again”, “Good” or “Hard” will show you the card again within a few minutes. These small repetition intervals are useful for other kinds of flashcards, but here if we fail a problem, we would rather see it on the next day than just a few minutes later.

Therefore, if your submission is rejected, don’t click on any of the other buttons: read the solution and then bury the card. When you bury a card, it will show up again the next day.

Pressing the minus key on your keyboard ( “-” ) will bury the card. Alternatively, you can click on the “More” button at the bottom right corner and then “Bury card”.

Step 3

If you fail on the next day, read up the solution and bury the card again. Keep on doing this until your submission is accepted and you click on “Easy”.

Step 4

After the first time you click on “Easy”, the card will “graduate”. This means that the next time you see the card, the intervals for “Hard” and “Good” will become days instead of minutes. So now it makes sense to click on them.

Screenshot 3

If you are totally clueless, don’t click on Again: bury the card. If you failed after trying to code the right pattern, click on Hard. If your submission is almost right but you failed because you missed out on some small detail, click on Good. Finally, if your submission is accepted, click on Easy.

Interval modifier So that’s how you can use Anki with leetcode without having to change the default app settings. In my experience, this approach works perfectly fine. However, there is still one default setting worth adjusting, and that is the interval modifier.

If you feel that Anki is repeating problems too often, you can increase the interval modifier from 1.00 to a value like 1.20 or 1.30. If you’re getting 100% of your cards right this means you should increase the interval modifier. Ideally you want to fail between 10% and 20% of the time.

On the initial screen for your deck, edit the deck settings under “Options”. Change the interval modifier under “Advanced”.

Screenshot 4

Screenshot 5

[Alice] The screenshots disappeared.