Computer science has a unique problem: the field is simultaneously about deep understanding and raw recall. You need to genuinely understand why a hash table gives O(1) average lookups, but you also need to instantly recall that fact when you're 20 minutes into a whiteboard interview. You need to understand how virtual memory works conceptually, but you also need to remember the specific page replacement algorithms and their tradeoffs for your operating systems final.
Most CS students study by reading textbooks, watching lectures, and grinding LeetCode problems. This works for short-term exams, but six months later, you've forgotten the difference between Dijkstra's and Bellman-Ford, you can't remember the time complexity of heapify, and you're re-learning concepts you supposedly mastered two semesters ago.
Anki is a free, open-source flashcard app built on spaced repetition — a study method that shows you material right before you'd naturally forget it. It's been a staple in medical education for years. CS students are starting to adopt it too, and the results speak for themselves: stronger fundamentals, faster interview prep, and less time re-learning old material.
Why Anki Works for Computer Science
CS Is Cumulative and Interconnected
Data structures feeds into algorithms. Algorithms feeds into operating systems, databases, and distributed systems. Discrete math underpins everything from graph theory to cryptography. If you've forgotten how trees work, you'll struggle with B-trees in databases, parse trees in compilers, and spanning trees in networks.
Spaced repetition keeps foundational knowledge active. When you review a card about AVL tree rotations every few weeks, you don't have to re-learn the concept when it appears in a database indexing lecture.
Complexity Analysis Requires Instant Recall
By junior year, you're expected to know the time and space complexity of dozens of operations across many data structures. Binary search is O(log n). Building a heap is O(n), not O(n log n) — and knowing why matters. Quicksort is O(n log n) average but O(n²) worst case.
In interviews, you can't pause to derive these from scratch. You need them at your fingertips. Anki drills these into long-term memory so that when an interviewer asks "What's the time complexity of inserting into a balanced BST?", you answer O(log n) without hesitation and can explain why.
Technical Interviews Test Breadth and Depth
Whether you're interviewing at a FAANG company or a startup, technical interviews cover a massive surface area: arrays, strings, linked lists, trees, graphs, dynamic programming, system design, object-oriented principles, concurrency, and more. You can't cram all of this in two weeks.
Students who start building Anki decks during coursework arrive at interview season with thousands of review-tested cards covering every major topic. Instead of panicking through a crash course, they're reviewing and sharpening knowledge they've already retained.
What to Put on Your Cards
Data Structures
Data structures are the bread and butter of CS education and interviews. Create cards for:
Definitions and properties:
- Front: "What is the load factor of a hash table?"
- Back: "The ratio of stored elements to the number of buckets (n/k). When it exceeds a threshold (typically 0.75), the table resizes."
Operations and complexities:
- Front: "Time complexity of search, insert, and delete in a balanced BST?"
- Back: "All O(log n) — tree height is O(log n) when balanced."
Tradeoffs and comparisons:
- Front: "When would you use a hash map vs. a balanced BST?"
- Back: "Hash map: O(1) average operations, unordered. BST: O(log n) operations, but maintains sorted order — use when you need range queries, min/max, or ordered iteration."
Implementation details:
- Front: "How does a hash table handle collisions? Name two strategies."
- Back: "1) Chaining — each bucket holds a linked list. 2) Open addressing — probe for the next empty slot (linear probing, quadratic probing, double hashing)."
Algorithms
Algorithms cards should focus on the pattern, not the code. You want to recognize when to apply an algorithm, not memorize syntax.
Algorithm identification:
- Front: "You need to find the shortest path in an unweighted graph. What algorithm?"
- Back: "BFS — it naturally finds shortest paths in unweighted graphs since it explores level by level."
Key properties:
- Front: "What are the conditions for using dynamic programming?"
- Back: "1) Optimal substructure — optimal solution contains optimal solutions to subproblems. 2) Overlapping subproblems — the same subproblems are solved repeatedly."
Complexity cards:
- Front: "Time and space complexity of merge sort?"
- Back: "Time: O(n log n) in all cases. Space: O(n) — needs auxiliary array for merging. Stable sort."
Pattern recognition:
- Front: "Sliding window technique — when do you use it?"
- Back: "When you need to find a subarray or substring that satisfies some condition (max sum, minimum length, contains all characters). Maintain a window with two pointers, expand right, shrink left."
Operating Systems
OS courses are concept-heavy and love tricky edge cases:
- Front: "What's the difference between a process and a thread?"
- Back: "A process has its own address space, file descriptors, and resources. Threads share the process's address space and resources but have their own stack and registers. Thread context switches are cheaper than process context switches."
- Front: "Explain the producer-consumer problem."
- Back: "Producers generate data into a bounded buffer, consumers remove it. Requires synchronization: mutex for mutual exclusion, semaphores for counting empty/full slots. Classic solution uses three semaphores: mutex, empty, full."
- Front: "What is thrashing?"
- Back: "When a system spends more time paging (swapping memory to disk) than executing processes. Happens when working set exceeds physical memory. Solution: reduce degree of multiprogramming or add RAM."
Databases
- Front: "What are the ACID properties?"
- Back: "Atomicity (all or nothing), Consistency (valid state to valid state), Isolation (concurrent transactions don't interfere), Durability (committed data survives crashes)."
- Front: "Explain the difference between B-tree and B+ tree."
- Back: "B-tree stores data in all nodes. B+ tree stores data only in leaf nodes, with leaves linked for efficient range queries. B+ trees are preferred for databases because sequential access is faster."
Networking
- Front: "What happens when you type a URL into your browser?"
- Back: "DNS resolution → TCP handshake (SYN, SYN-ACK, ACK) → TLS handshake (if HTTPS) → HTTP request → server processes request → HTTP response → browser renders HTML/CSS/JS."
- Front: "TCP vs UDP — when do you use each?"
- Back: "TCP: reliable, ordered, connection-oriented. Use for web, email, file transfer. UDP: unreliable, unordered, connectionless. Use for video streaming, gaming, DNS lookups — when speed matters more than reliability."
How to Structure Your Decks
Option 1: One Deck Per Course
Create a deck for each class: CS::Data Structures, CS::Algorithms, CS::Operating Systems. This keeps cards organized and lets you study specific topics when an exam approaches.
Option 2: Flat Interview Deck
If your main goal is interview prep, throw everything into a single Technical Interview deck. Interleaving topics mirrors the randomness of real interviews, where you might get a graph question followed by a system design question.
Best Approach: Hybrid
Use course-specific decks during the semester, then move the most important cards to a consolidated interview deck. Tag everything (#trees, #dynamic-programming, #system-design) so you can create filtered decks for targeted review.
Making Cards from Lecture Slides
CS lectures are packed with diagrams, pseudocode, and concept explanations spread across dozens of slides. Manually creating cards from a 60-slide lecture on graph algorithms is tedious.
SlideToAnki converts your lecture slides directly into Anki flashcards. Upload a PDF of your algorithms lecture and get cards covering key concepts, complexities, and definitions — ready to import into Anki. It's especially useful for CS courses where slides contain both visual content (tree diagrams, network topologies) and textual definitions.
Tips for CS-Specific Anki Usage
Don't Memorize Code
It's tempting to put a full implementation of quicksort on a card. Don't. You'll memorize the syntax without understanding the algorithm. Instead, make cards about:
- The high-level approach (partition around pivot, recurse on halves)
- The complexity and why (average case requires log n levels of recursion, each doing n work)
- When it's preferred over alternatives (in-place, cache-friendly, fast in practice despite O(n²) worst case)
If you understand these, you can implement it in any language.
Use Cloze Deletions for Definitions
Cloze deletions work well for precise definitions:
"In a graph, a topological sort produces a linear ordering of vertices such that for every directed edge (u,v), u comes before v. Only possible on directed acyclic graphs (DAGs)."
Add "Why" Cards
Don't just memorize that hash table lookup is O(1). Add a card asking why:
- Front: "Why is hash table lookup O(1) on average?"
- Back: "The hash function maps the key directly to a bucket index in constant time. With a good hash function and low load factor, most buckets contain 0-1 elements, so lookup is constant. Degrades to O(n) with many collisions."
Review Before Problem Sets
Do your Anki reviews before sitting down to code. Fresh recall of tree traversals, DP patterns, or graph algorithms means you'll recognize applicable techniques faster when solving problems.
Start Early in the Semester
The biggest mistake is waiting until interview season to build your deck. Start on day one of each course. By the time you're job hunting, you'll have a battle-tested deck that's already in long-term memory.
Building Your Deck Faster
Manually creating hundreds of cards is the biggest barrier to adoption. Here's how to speed it up:
- During lectures: Note key concepts, definitions, and complexity analyses. Spend 10 minutes after class turning them into cards.
- From textbook problems: After solving a problem set, create cards for any concept you had to look up.
- From SlideToAnki: Upload your lecture PDFs to SlideToAnki and get auto-generated cards. Review and edit them — AI-generated cards are a starting point, not a final product.
- From LeetCode: After solving a problem, create a card about the pattern, not the specific problem. "Two-pointer technique for sorted array problems" is more valuable than "LeetCode #167 solution."
What Your Daily Routine Looks Like
A CS student using Anki effectively might spend:
- 15-20 minutes/day on reviews (this grows as your deck grows, but FSRS keeps it manageable)
- 10 minutes after each lecture creating new cards
- 5 minutes after each problem set adding pattern/concept cards
That's roughly 30 minutes of daily Anki work. In exchange, you retain virtually everything from every CS course you take, and interview season becomes review rather than re-learning.
The Bottom Line
Computer science rewards people who retain fundamentals. The student who remembers graph traversals from sophomore year has a massive advantage in algorithms, systems, and interviews. Anki isn't a replacement for understanding — you still need to work through problems, write code, and build projects. But it ensures that the understanding you develop sticks around long enough to actually use.
Start with your hardest current course. Create 5-10 cards after each lecture. Review daily. By the time technical interviews roll around, you'll have a library of knowledge that most candidates spend weeks trying to re-learn.