Spaced Repetition for DSA: Review the Right Unit
Spaced repetition DSA guide. Review identification triggers, not full solutions. Includes a concrete schedule and the right flashcard format.
What spaced repetition is and why it works for long term retention
Why solving problems again is the wrong review unit for DSA
How identification triggers make spaced repetition effective
A concrete Day 1 through Day 30 review schedule you can start today
Spaced repetition for DSA usually gets applied wrong. They create flashcards for solutions, solve problems again on a schedule, and still forget the reasoning two weeks later. The spaced repetition DSA method works, but the review unit doesn't.
What spaced repetition actually is
Spaced repetition schedules recall practice at expanding intervals. You review something after 1 day, then 3 days, then 7, then 14, then 30. Each successful recall strengthens the memory trace and pushes the next review further out.
The method works because memory doesn't decay linearly. Your ability to recall something drops sharply in the first 48 hours, then flattens. A single review right before that sharp drop resets the curve and makes the next drop slower. Ebbinghaus documented this in 1885 with his forgetting curve research, and the spacing effect has held up across hundreds of studies since. (His exact decay rates are debatable with modern methods, but the core mechanism isn't.)
For DSA, spaced repetition works best when the review unit is the identification trigger, not the full solution. An identification trigger is the set of structural features in a problem that signal which pattern applies. Reviewing these associations at expanding intervals builds durable recall that transfers to unseen problems.
The distinction matters.
You aren't trying to memorise a specific solution. You're trying to make the connection between problem features and pattern selection automatic, and that needs different flashcard material.
Why the default approach doesn't work
The default approach looks something like this. You solve a sliding window problem on Monday. You add it to your Anki deck or review log. On Thursday, you solve it again. A week later, you solve it once more.
That practice misses the point. You're practising solution execution, not the skill of spotting which pattern applies. By the second review, you remember this specific problem uses a sliding window. You aren't practising the skill of reading an unfamiliar problem and recognising the sliding window triggers in it. You're reexecuting a known solution with decreasing effort each time, and eventually you're just going through the motions.
This is why maintaining a spaced repetition schedule for months can still leave you freezing on novel problems. They've reinforced the association between this specific problem and this specific solution. That association is near transfer at best.
When the surface features change, when a new problem requires the same pattern but looks nothing like the one they reviewed, the recall doesn't fire.
“Solving a problem again on a schedule trains recall of that solution. It doesn't train the skill of recognising when the pattern applies to something you haven't seen.”
The other common mistake is reviewing too much at once. Another trap is building decks of 200+ cards covering entire solutions, code, edge cases, complexity analysis, all of it. By week three, the daily review burden is 45 minutes, motivation drops, and the system collapses. Spaced repetition only works if the individual review unit is small enough to sustain over months.
The right unit to review
The right unit for spaced repetition in DSA is the connection between problem features and the pattern they point to.
Take the variable sliding window pattern. The structural cues are:
- The problem asks for the longest/shortest contiguous subarray or substring
- There's a constraint on what the window can contain (at most K distinct characters, sum at most K)
- The optimal subarray size isn't fixed, because it depends on the constraint
Your flashcard for this pattern isn't "implement variable sliding window." It's:
Front: Problem mentions contiguous range + constraint on window contents + optimise length. Which pattern?
Back: Variable sliding window. Expand right until constraint breaks, contract left until it holds again.
One card per pattern. On the front, you describe the features you'd see in a problem statement, and the back names the pattern and its one sentence mechanism.
This format works for any pattern. Take the two pointer reduction pattern:
Front: Problem reduces to "find two elements that satisfy a condition" after sorting. Which pattern?
Back: Two pointer reduction. Sort the array, walk pointers inward from both ends.
For each pattern you learn, you create one card. If you've covered 15 patterns, you have 15 cards. That's 3-5 minutes of daily review once the intervals expand past the first week, and it stays sustainable for months.
The reason this works is that linking problem features to the right pattern is a factual association, not a procedure. Spaced repetition is built for factual associations. "Contiguous range + constraint + optimise length → variable sliding window" is a factual mapping. "How to implement a variable sliding window" is a procedure. Procedures are better learned through deliberate practice, which is what problem solving sessions are for. Your review schedule handles the factual layer. Your practice sessions handle the procedural layer.
On Codeintuition, the identification lessons teach these triggers explicitly for each pattern before you see any problems. You aren't reverse engineering triggers from solutions. You're learning them as standalone knowledge units, exactly the format that makes spaced repetition effective.
A simple spaced repetition schedule for DSA
You don't need a complex system. This schedule works with Anki, a spreadsheet, or a notebook.
What to do when a review fails. Don't just reread the back of the card. Go back to the pattern's understanding lesson and restudy why those specific features trigger that pattern. A failed review means the association isn't grounded in understanding yet. It's rote memory, and rote memory breaks under pressure.
How many cards should you add at once? Add new cards only when you study a new pattern. Don't frontload 15 cards on day one. If you're working through a structured learning path that introduces patterns sequentially, add each card as you complete that pattern's lessons. Two to three new cards per week is sustainable.
Tracking format if you're not using Anki. A simple spreadsheet works:
- Variable sliding windowContiguous range + constraint + optimise length
- Two pointer reductionTwo element condition after sorting
- Monotonic stackNext greater/smaller element in sequence
- Variable sliding windowMar 18
- Two pointer reductionMar 15
- Monotonic stackMar 20
- Variable sliding windowMar 25
- Two pointer reductionMar 29
- Monotonic stackMar 23
- Variable sliding windowCorrect
- Two pointer reductionCorrect
- Monotonic stackFailed, restudy
What durable encoding looks like
There's a difference between "I remember this pattern" and "this pattern fires automatically when I see the right features." The first is recall. The second is what you're building toward.
You'll know the spaced repetition is working when you read a new problem and the pattern name surfaces before you consciously search for it. You see "contiguous subarray" and "at most K" in the problem statement, and variable sliding window appears in your mind without effort. That's the identification layer becoming automatic.
Why does this transfer to unseen problems? Because the triggers you're reviewing are structural, not surface level. A problem about "longest substring with at most K distinct characters" and a problem about "smallest subarray with sum at least K" look completely different on the surface. But the structural features are identical: contiguous range, constraint on window contents, optimise length. If you've drilled the trigger, you recognise both.
This is how experienced engineers seem to "just know" which approach to use. They aren't recalling specific problems. They're reading problem features and matching against triggers they've internalised over years of practice.
Spaced repetition compresses that timeline from years to weeks, but only if the review unit is right.
If forgetting what you've learned has been a recurring frustration, this is likely the fix. You don't need more problems or longer study sessions. A small, sustainable review practice targeting the connection between problem features and patterns is enough.
Picture yourself three months from now. You've reviewed 15 pattern trigger cards, each taking under 10 seconds. You open a medium difficulty problem you've never seen. The constraints mention "contiguous range" and "maximum length." Before you've finished reading, the pattern has already surfaced. You don't reach for a hint. You build the solution from the invariant, starting with the window bounds. That's not talent. That's a trained skill compounded over 90 days of three minute reviews.
The first time you recognise a pattern in an unfamiliar problem without hesitation, you'll know the method is working. Start with one pattern, build the card, and review it on schedule. Then add the next.
Learn the identification triggers, then review them on schedule.
Codeintuition's identification lessons teach the exact triggers that belong on your spaced repetition cards. Each pattern starts with the features to pattern mapping you'll review at expanding intervals for FREE