CodingPartner

← All articles

Spaced Repetition for LeetCode: Schedule, Anki & Trackers

Most people practice LeetCode like a to-do list: solve a problem, check it off, never see it again. Then in the interview, a problem they "did" three weeks ago feels brand new. The missing piece isn't more problems — it's spaced repetition: reviewing what you've solved at increasing intervals so it sticks.

Here's how the forgetting curve works, and a concrete schedule you can actually follow.

Why solved problems fade

A single solve creates a weak memory trace. Without reinforcement, most of it decays within days — the classic forgetting curve. Two ideas beat that curve, and both are well-established in learning science:

  • Active recall — retrieve the solution from memory instead of re-reading it. The effort of recall is what strengthens the trace. Re-reading an editorial feels productive but barely helps; re-deriving from a blank page is what works.
  • Spaced repetition — review at growing intervals (a couple of days, then a week, then longer). Each successful recall pushes the next review further out; a failed one pulls it back in.

Put together: don't re-read your old solutions — re-solve them, on a schedule tuned to how well you remembered.

A concrete schedule

You don't need a complicated system. A simple confidence-based ladder works:

When you finish a problem, rate your confidence 1–5:

  • 1–4 (shaky): review again in ~2 days. Anything you struggled with comes back fast, on a short loop, until it's solid.
  • 5 (fully solid): stretch the interval each time you keep nailing it: ~2 days → 1 week → 2 weeks → monthly.
  • Dropped a level? If a "5" problem trips you up on review, reset it to the short 2-day loop and climb again.

The exact numbers matter less than the principle: retrieve under increasing difficulty. That's precisely what an interview demands — recalling an approach cold, days or weeks after you last touched it.

(This is the schedule CodingPartner uses under the hood, so you don't have to track intervals by hand.)

How to actually review (not just re-read)

On review day, do this:

  1. Open the problem, not your old solution. Blank editor.
  2. Re-derive the approach out loud. Name the pattern first ("this is a sliding window because…"), then rebuild the code. If you can't, that's the signal — you recognized it before but couldn't recall it.
  3. Focus on the "why." Ask why the data structure fits, why the approach is correct, why the complexity is what it is. Understanding the why is what lets you reconstruct the how under pressure.
  4. Re-rate honestly. Your rating drives the next interval. Be strict — a generous "5" you can't actually reproduce just means you'll forget it again.

Anki for LeetCode: does it work?

Anki is the best-known spaced-repetition app, so it's the first thing many people try. It can work — with one important adjustment.

What goes wrong: most LeetCode Anki decks put the problem on the front and the code on the back. You flip the card, recognize the code, rate it "Good," and move on. That trains recognition, the exact thing that fails in interviews. It also turns a 20-minute re-solve into a 10-second card, so it feels efficient while testing the wrong skill.

How to make Anki work for LeetCode:

  • Front: the problem prompt only. No title hints, no tags if you can avoid it.
  • Back: the pattern and the key insight — one or two sentences on why the approach works — not the full code.
  • Grade yourself on a real re-solve. When a card comes up, open the problem and write the solution from a blank editor before flipping. Only then rate it.
  • Keep your own deck. Shared LeetCode Anki decks are a fine starting list, but writing the insight yourself is part of how it sticks.

Anki vs a LeetCode tracker:

Anki Spreadsheet tracker LeetCode-specific tool
Scheduling Excellent (FSRS / SM-2) Formula-based Built for problems, not cards
Fits "re-solve the problem" Only if you're disciplined Yes Yes
Adding a problem Manual card Manual row Can import from LeetCode
Pattern / weak-spot view No With filters Usually built in

If you already use Anki daily, keep using it with the card format above. If you don't, a LeetCode tracker that schedules problems rather than cards is usually a better fit — our free spreadsheet template uses the same schedule as this article.

Why this beats grinding more problems

Two people can both have 150 solved problems and completely different interview readiness. One grinded and moved on; the other reviewed on a schedule and turned recognition into recall. Volume adds weakly-encoded traces that all decay; spaced review compounds the ones you already have. If you only change one thing about how you use LeetCode, make it this.

The hard part isn't agreeing with spaced repetition — it's tracking "which problem is due, at what interval, based on how I did last time" by hand, which is tedious enough that it never happens. That's the one thing worth automating. CodingPartner's review queue does exactly that: it resurfaces each problem right before you'd forget it, so your solved problems stay solved.

Related: Why you forget LeetCode solutions · How many LeetCode problems should I do?