Back to blog

Spaced repetition for CS and coding interviews

How to use spaced repetition for computer science to master algorithms, syntax, and systems without burning out on LeetCode.

If you are studying computer science or prepping for technical interviews, you have probably felt the "forgetting curve" hit you hard. You spend a weekend mastering the implementation of a Red-Black tree or the specific syntax for a Python list comprehension, only to stare blankly at a whiteboard three weeks later.

Most CS students try to solve this by "doing more LeetCode." But solving 400 problems is a brute force solution to a memory problem. You can actually use spaced repetition to ensure that once you understand a concept, you never have to "re-learn" it from scratch.

I use these methods myself at the University of Toronto, where I am a third year Engineering Science student specializing in machine intelligence. I also work on Nebulearn. I treat that as a conflict of interest, but I built it because I wanted a faster way to bridge the gap between reading a technical PDF and having a real review queue.

The only way to stop that whiteboard freeze is to move the core logic into your long-term memory before the interview starts.

What spaced repetition actually does for programmers

To do that, you need to understand the difference between a 'study session' and a due queue. Spaced repetition is a system that schedules reviews of information at increasing intervals based on your performance. If you know a concept well, you see it in a month. If you struggle, you see it tomorrow.

In computer science, this is not just about memorizing definitions. It is about three specific buckets:

  1. Syntax and APIs: Remembering that .slice() in JavaScript takes (start, end) while .splice() takes (start, deleteCount).
  2. Algorithms and Logic: Recalling the time complexity of a Heapify operation or the base case for a specific recursive pattern.
  3. Systems and Architecture: Understanding how a load balancer handles state or the difference between ACID and BASE in databases.

The goal is to move these from "I can look that up" to "active recall." When you are in an interview, you do not want to waste your mental stack trying to remember how to initialize a priority queue in C++. You want that to be an automatic reflex.

The split between Anki and LeetCode

The most common question I see is whether you should use Anki for LeetCode. The answer is yes, but only for the logic, not the typing.

Anki is incredible for long term retention. It is free on desktop and Android, though AnkiMobile for iOS is about $25 one-time. It is the gold standard for medical students, and it works for CS if you focus on "why" a solution works.

However, Anki is not a code editor. If you try to write entire functions inside a flashcard, you will hate the process. You should use flashcards to prompt the strategy of a problem, then go to a real IDE or a whiteboard to actually write the code.

JobBest ToolWhy
Long-term logicAnki / NebulearnFSRS-based scheduling ensures you don't forget the trick to the problem.
Typing speedLeetCode / IDEYou need the tactile feedback of a compiler and real edge cases.
Quick CrammingQuizletGood for a Friday test, but their free "Learn" mode is session-based, not a true calendar.

If you are already deep into a 2,000 card Anki deck, stay there. You can read more about how it stacks up in my study app comparison. Moving your review history is difficult because review data does not transfer cleanly between apps. But if you are starting a new course this week and need to turn lecture slides into cards quickly, the manual entry in Anki can become a bottleneck.

What should not be a flashcard

The biggest mistake CS students make is trying to flashcard everything. If a piece of information can be derived logically in two seconds, do not make a card for it.

Do not make cards for:

  • Large blocks of code. You will end up memorizing the shape of the text rather than the logic.
  • Every single library method. Only card the ones you actually use in your primary language.
  • Math proofs that you can re-derive.

Do make cards for:

  • Cloze deletions for syntax: "The map() function in Python returns a(n) {{c1::iterator}}."
  • Problem prompts: "What is the key insight for solving the 'Meeting Rooms II' problem using a Min-Heap?"
  • Complexity: "Worst case time complexity for QuickSort is {{c1::O(n^2)}}."

Using Cloze and Problem Prompts effectively

In my Engineering Science courses, I rely heavily on Cloze deletions. This is where you hide a part of a sentence and try to fill it in. For systems programming, this is the fastest way to learn how different components interact.

For coding interviews, I prefer "Insight Cards." Instead of "Solve Two Sum," the card should say: "How do you achieve O(n) time complexity for Two Sum?" The answer is "Use a Hash Map to store the complement of each number."

This forces your brain to recall the mechanism. Once you have the mechanism, the implementation is just a matter of practice. But knowing the mechanism doesn't help if you never find the time to put it into your system.

Why the bottleneck is usually creation

If you are taking a heavy course load, the reason you stop using spaced repetition is usually because making the cards takes too long. Copying snippets from a documentation site or a PDF into a card editor is tedious.

This is why I built the Nebulearn Chrome extension. It lets you highlight text directly on a page (like MDN or a course portal) and send it to a card without switching tabs. You can even snip a diagram of a binary tree directly into a card.

If you are looking for an app that handles the scheduling for you without the setup overhead of Anki, Nebulearn is built for this. We use the FSRS (Free Spaced Repetition Scheduler) algorithm by default. This is the most modern model for predicting when you will forget something, so you don't waste time on "easy" cards.

Final verdict for CS students

If you have a massive shared deck for a specific certification (like AWS or CCNA), Anki is the best choice because of the community support.

If you are a student trying to keep up with new lectures every week, or a developer prepping for interviews while working a full-time job, you need to minimize the time spent making cards. The goal is to spend your time solving problems, not formatting tables in a card editor.

Nebulearn is built to solve that creation bottleneck. The free tier gives you 1,000 saved questions and 40 weekly AI credits to help generate cards from your highlights. There are no ads in the study session, so you can actually focus on the logic.

spaced repetitioncomputer scienceankicoding interviews