Computer science, explained properly
Understand it once.
Revise it at a glance.
In-depth computer science study guides with runnable code, worked examples, and interview-focused explanations — plus a Glance Mode that turns each long article into a two-minute revision sheet.
101
Topics published
120
Flashcards
Code that actually runs
Every example is executed before publishing, and the guide shows its real output and measured numbers.
Reviewed before it goes live
Each guide passes a technical review and an originality and accuracy check. Corrections are welcome on the contact page.
Built for revision
Glance Mode turns any guide into a two-minute summary with a cheat sheet, for the night before an interview.
Newly published
Latest course content
AI & ML
Retrieval-Augmented Generation (RAG)
RAG retrieves relevant passages at question time and adds them to an LLM's prompt. A local test: BM25 found 1 of 12 paraphrased questions, a small embedding model found 8.
DBMS
SQL vs NoSQL: Choosing a Data Store
Choose by access pattern, not brand. On 20,000 orders, one order fetch tied (~0.006 ms) as a join or a document; a cross-order report ran 4-5x slower over documents.
Data Science
Feature Engineering and Encoding
How to turn categories, numbers, times and gaps into model inputs without leaking labels. On a noise ID, naive target encoding scored train AUC 0.905; cross-fitted, 0.512.
Readers' favourites
Most read
DSA
Dynamic Programming: From Recursion to a Table
Dynamic programming turns an exponential recursion into a table of reused answers. Fibonacci drops from 2.7 million calls to 31, then coin change, counting ways, LCS and knapsack, all run.
DSA
Heaps and Priority Queues
How a binary heap stores a priority queue in a plain array, why building one is O(n), and patterns that use it: kth largest, merging sorted lists, task priorities. Python heapq with measured counts.
DBMS
How B+ Tree Indexes Work
Why databases index with B+ trees: wide nodes keep the tree 3 levels deep for 134 million keys, and linked leaves make range scans cheap. A small Python B+ tree and SQLite query plans show it.
System Design
Distributed Cache Design: Sharding, Stampedes and Staleness
Design notes for a cache spread over many nodes: cache-aside, why consistent hashing moves 22% of keys instead of 80%, preventing a cache stampede (50 DB calls down to 1), TTL jitter, and staleness.
60-second cards
Quick revise
Why does traversing a contiguous array of size N typically outperform traversing a singly linked list of the same size, even though both operations have an O(N) time complexity?
Array elements are stored in contiguous memory locations, which maximizes CPU cache locality and allows the system to prefetch data efficiently. In contrast, linked list nodes are scattered across memory, causing frequent cache misses as the CPU must repeatedly look up pointer addresses.
REVIEW 60s
In a hash table, why does the search performance of Open Addressing (like linear probing) degrade much faster than Separate Chaining as the load factor approaches 1?
As the load factor approaches 1, Open Addressing suffers from clustering, where long runs of occupied slots form and drastically increase the number of probes needed to find an empty slot. Separate Chaining handles collisions by appending to lists, meaning lookup time degrades gradually relative to the average list length rather than failing to locate a slot.
REVIEW 60s
For a deeply nested, narrow tree (e.g., a degenerate tree of depth N and width 1), would BFS or DFS require less auxiliary space, and why?
BFS would require less auxiliary space, specifically O(1) memory, because its queue will hold at most one node at any given level. In contrast, DFS would require O(N) auxiliary space because its recursion stack must store all N ancestor nodes from the root to the leaf.
REVIEW 60s
Study tracks