‹/›
Subject

Computer Science

Algorithms, data structures, AI, systems, and computing fundamentals. Every concept visualized with interactive 3D animations.

550
Concepts
550
Videos
Type to filter instantly
Or swipe through 60-second video shorts →
550 concepts

2-SAT · The satisfiability problem that turns into a graph — and gets solved in one linear pass

2-SAT decides a boolean formula made of two-literal clauses in O(n + m) time by building an implication graph, finding its strongly connected componen

Algorithms

2D Fenwick Tree (Binary Indexed Tree) · Nest two BIT loops, get submatrix sums in O(log² N)

A 2D Fenwick tree nests two BIT loops to support point updates and submatrix prefix sums in O(log N · log M). It is the canonical structure for dynami

Data Structures

A* Pathfinding · Shortest Route

A* pathfinding explained in 3D — watch the algorithm explore cells using f = g + h to find the shortest path through obstacles. Interactive animation

Computer Science

ACID Properties · The four promises a transaction makes

ACID properties — atomicity, consistency, isolation, durability — are the four guarantees a database transaction makes. Together they let you treat a

Databases

AES Block Cipher · The cipher that encrypts almost everything you send

AES is a symmetric block cipher that encrypts 128-bit blocks through 10, 12, or 14 rounds of byte substitution, row shifts, column mixing, and key add

Cryptography

API Rate Limiting · Token bucket, leaky bucket, sliding window — three classical algorithms

API rate limiting is the practice of capping the number of requests a client can make in a time window to protect backend resources, prevent abuse, an

Web

ARIES Crash Recovery · Analysis, Redo, and Undo with LSN Tracking

ARIES crash recovery explained: the Analysis, Redo, and Undo phases, LSN tracking, WAL, CLRs, and fuzzy checkpoints that make databases like Db2 crash

Databases

ARP (Address Resolution Protocol) · The shout-into-the-room that turns an IP into a MAC address

ARP (Address Resolution Protocol) maps a known IPv4 address to the unknown 48-bit MAC address on a local network by broadcasting a who-has request to

Networking

AVL Tree · The strictest balanced BST — and the cheapest to look up

An AVL tree is a self-balancing binary search tree that keeps the heights of any node's two subtrees within ±1, guaranteeing O(log n) lookup, insert,

Data Structures

Actor Model · Independent units, private state, one message at a time — no locks, no shared memory

The actor model treats concurrency as isolated entities that own private state and process one message at a time from a mailbox. Erlang and Akka popul

Concurrency Patterns

Actor-Critic Methods · Two networks, one team: a doer and a judge that trains it

Actor-critic methods pair a policy network (the actor) that picks actions with a value network (the critic) that scores them, using the critic's advan

Machine Learning

Adam Optimizer · One learning rate per parameter — tuned by the gradient's own history

Adam is a gradient-descent optimizer that gives every parameter its own adaptive learning rate, derived from running estimates of the gradient's mean

Machine Learning

Address Space Layout Randomization (ASLR) · Shuffle the deck every run so the attacker never knows where to jump

Address Space Layout Randomization (ASLR) is an OS defense that randomizes the base addresses of the stack, heap, libraries, and executable each run,

Security

Aho-Corasick Algorithm · Build a trie, add failure links, find all occurrences of k patterns in O(n + m + z)

Aho-Corasick is a string-matching algorithm that locates all occurrences of any pattern from a finite set within a text in a single pass, with time co

String Algorithms

Aho-Corasick Multi-Pattern Matching · Trie + failure links + output links — find every occurrence of every pattern in one pass

Aho-Corasick scans one text for every pattern in a dictionary in a single pass — O(n + m + z). Build a trie of patterns, add failure links (BFS) and o

String Algorithms

Algebraic Data Types · Build types from "and" and "or" — then watch the illegal states disappear

Algebraic data types build new types by combining "and" (products: structs and tuples) and "or" (sums: tagged unions), where the total number of value

Type Systems

Algorithm X — Exact Cover · Knuth's recursive backtracker that turns NP-complete into "milliseconds"

Knuth's Algorithm X solves exact-cover problems with dancing links: pick the smallest constraint column, try each candidate row, cover, recurse, uncov

Combinatorial Algorithms

Alias Method Sampling · O(1) per draw from any discrete distribution, after O(n) setup

Walker's alias method samples from a discrete distribution in O(1) time after O(n) preprocessing. Two arrays, one uniform draw, one biased coin — no b

Sampling Algorithms

Amortized Analysis · How a rare O(n) operation hides inside an O(1) average

Amortized analysis averages the cost of a rare expensive operation over the many cheap ones around it. It's why a dynamic array's push is O(1) amortiz

Theory

Anti-Entropy · The background process that keeps eventual consistency honest

Anti-entropy is a background process that periodically compares replicas using Merkle trees and repairs divergence — providing an eventual-consistency

Distributed Systems

Anycast · One IP address, many locations, routed to the nearest

Anycast is a network-addressing technique where multiple servers in different geographic locations advertise the same IP prefix via BGP. The Internet&

Networking

Async / Await · Suspend at await, resume when the future completes — no thread blocked

async/await is syntactic sugar over promise chaining — a function suspends at each await and resumes when the awaited future completes. Cooperative mu

Concurrency Patterns

Atomic Operations · Read-modify-write that completes indivisibly — fetch-add, CAS, LL/SC

An atomic operation is a CPU instruction (or sequence) that completes as an indivisible unit — no other thread can observe an intermediate state. Comm

Concurrency

Authenticated Encryption (AEAD) · Encrypt and authenticate in one shot — so a single flipped bit gets rejected, not decrypted

Authenticated encryption (AEAD) combines a cipher with a message authentication tag so any tampering with the ciphertext is detected before decryption

Cryptography

Autoencoder · Squeeze data through a bottleneck and learn what matters

An autoencoder is a neural network trained to copy its input to its output through a narrow bottleneck, forcing it to learn a compressed latent repres

Machine Learning

B+ Tree · The shape of every database index since 1972

A B+ tree is a balanced multi-way tree that stores all data in linked leaf nodes and uses internal nodes only as a search index. It's the data structu

Data Structures

B-Tree · Multi-Way Disk-Friendly

Each node holds many sorted keys — dozens to hundreds — keeping tree depth shallow enough that million-record lookups fit in 3-4 disk reads. The backb

Data Structures

BLS Signatures · Aggregating Thousands of Signatures Into One

BLS signatures explained: how Boneh-Lynn-Shacham pairing-based signatures aggregate thousands of signatures into one 96-byte point, with math, complex

Cryptography

Backpressure · When the consumer can't keep up, tell the producer to slow down

Backpressure is the flow-control signal slow consumers send upstream to slow producers down. Bounded queue + block/drop/spill modes. Used in Reactive

Concurrency Patterns

Backpropagation · Reverse-mode automatic differentiation — compute all weight gradients in one backward pass

Backpropagation is the algorithm at the heart of training neural networks. It computes the gradient of a scalar loss with respect to every weight in t

Machine Learning

Backtracking · Depth-first search that abandons doomed prefixes

Backtracking is a depth-first search of the solution space that abandons partial candidates the moment they cannot extend to a valid answer. It powers

Algorithms

Barrier Synchronization · N threads in, N threads out, simultaneous release

A barrier blocks N threads until all have arrived, then releases them simultaneously. Used in BSP parallel loops, GPU warp synchronization, and MPI bu

Concurrency

Barycentric Coordinates

Barycentric coordinates express any point inside a triangle as a weighted average of its three vertices, with weights that sum to 1. They power the in

Computer Graphics

Base64 Encoding · Three bytes in, four ASCII characters out — universal binary-to-text transport

Base64 encodes 3 raw bytes (24 bits) as 4 ASCII characters (6 bits each), expanding data by ~33%. Used in MIME email, data URIs, JWT, basic auth. The

Encoding

Batch Normalization · Re-center and rescale every layer's activations per mini-batch — and train deeper, faster

Batch normalization standardizes each layer's activations using the mean and variance of the current mini-batch, then rescales them with learned γ and

Machine Learning

Beam Search · Hedge your bets — keep the top k sequences, not just the best one

Beam search is a heuristic decoding algorithm that keeps the k highest-scoring partial sequences at each step instead of committing greedily to one, t

Machine Learning

Bellman-Ford · Shortest Path with Negative Weights

V-1 rounds of edge relaxation find shortest paths from a source — even with negative weights. Slower than Dijkstra, but strictly more general. Detects

Algorithms

Bezier Curves · Smooth curves you steer with a handful of points

A Bezier curve is a smooth parametric curve traced by repeatedly interpolating between control points. The de Casteljau algorithm evaluates it in O(n²

Computer Graphics

Bidirectional Dijkstra · Two Dijkstras meet in the middle — and finish faster

Bidirectional Dijkstra runs the search from source AND target at once. The frontiers meet in the middle — average √N nodes vs N — giving practical 2–5

Graph Algorithms

Big O Notation · Time Complexity

How Big O notation measures algorithm efficiency — see O(1), O(log n), O(n), O(n²), and O(2ⁿ) growth rates compared in 3D.

Algorithms

Binary Search

Step-by-step visualization of binary search on a sorted array — halving the search space with each comparison.

Algorithms

Binary Search Tree · O(log n)

3D tree of floating nodes with glowing edges. Keys travel down to find their position with in-order traversal.

Data Structures

Bit Manipulation Tricks · A handful of operators turn whole algorithms into single CPU cycles

Bit hacks compress whole algorithms into a few CPU cycles. Clear lowest bit with x & (x-1), isolate it with x & -x, count bits with Brian Kernighan or

Bit Manipulation

Block Cipher Modes (CBC, CTR, GCM) · A cipher only encrypts 16 bytes — modes are how you encrypt a gigabyte

Block cipher modes turn a fixed-size cipher like AES into a tool for encrypting arbitrary-length data: ECB encrypts each block independently and leaks

Cryptography

Blockchain · Linked Blocks

Chain of blocks where each block contains data and a cryptographic hash linking it to the previous block. Immutable, decentralized ledger.

Computer Science

Bloom Filter · Probabilistic Membership

A compact bit array with k hash functions. Tells you if an item is possibly in the set (with tunable false-positive rate) or definitely absent. No fal

Data Structures

Blossom Algorithm · Maximum Matching in General Graphs

The Blossom Algorithm explained: Edmonds' 1965 method for maximum matching in general graphs, how blossom contraction works, O(V^3) complexity, and wh

Graph Algorithms

Border Gateway Protocol (BGP) · Routes 850,000+ IP prefixes across 75,000+ ASes — the protocol holding the Internet together

BGP is the path-vector routing protocol that exchanges routing information between autonomous systems (ASes) — the ~75,000 networks (ISPs, enterprises

Networking

Borůvka's MST · The 1926 parallel-friendly MST — every component picks its cheapest neighbor at once

Borůvka's algorithm finds a minimum spanning tree by having every component pick its cheapest outgoing edge simultaneously. Components merge in parall

Graph Algorithms

Bounding Volume Hierarchy (BVH) · How one ray skips a million triangles to find the one it hits

A bounding volume hierarchy (BVH) is a tree of nested bounding boxes built over a scene's primitives, turning O(n) ray and collision queries into roug

Computer Graphics

Boyer-Moore String Search · Skip ahead by entire pattern lengths — O(n/m) best case, the secret behind grep

Boyer-Moore is a string-search algorithm that compares the pattern to the text from right to left and uses two heuristics — bad-character and good-suf

String Algorithms

Branch Prediction · Modern CPUs guess if/else outcomes 95%+ accurately — and pay 15-cycle penalties when wrong

Branch prediction is a CPU technique that guesses whether a conditional branch (if/while/for) will be taken before knowing the actual outcome — lettin

Computer Architecture

Breadth-First Search · level-order

3D graph explored level by level. The starting node glows, then neighbors light up in a wave using a queue.

Algorithms

Bresenham's Line Algorithm · How a 1962 IBM hack draws a perfect line with nothing but integer addition

Bresenham's line algorithm draws a straight line on a pixel grid using only integer addition, subtraction, and comparison — tracking a running error t

Computer Graphics

Bubble Sort · Simple Comparisons

Walk through the array swapping adjacent pairs that are out of order. Each pass bubbles the next largest value to its place. O(n²) — slow, but the cle

Algorithms

Buddy Allocator · Split on alloc, merge on free — power-of-two blocks the kernel can coalesce in O(1)

A buddy allocator manages memory as power-of-two blocks: split a larger block in half to allocate, merge a free block with its sibling buddy on free.

Memory Allocation

Buffer Pool Management · Clock-Sweep Eviction and Page Pinning

Clock-sweep eviction and page pinning explained: how database buffer pools approximate LRU in O(1), pin pages during I/O, and outperform strict LRU. W

Storage Systems

Bulk Insert Batching · One round-trip instead of a thousand — the universal high-write speedup

Bulk insert batching collapses many single-row INSERTs into one round-trip — eliminating network latency, transaction overhead, and WAL flush cost per

Distributed Patterns

Bulkhead Pattern · Partition resources per dependency — one compartment floods, the others stay dry

The bulkhead pattern isolates each dependency in its own resource pool — thread pool, connection pool, or process — so one downstream's failure can't

Resilience Patterns

Burrows-Wheeler Transform · A reversible permutation that clusters similar letters — the engine of bzip2

The Burrows-Wheeler Transform sorts all rotations of a string and outputs the last column. It clusters similar characters, making the result much more

Compression

Byte Pair Encoding (BPE) · A compression trick from 1994 that became the way GPT reads

Byte Pair Encoding (BPE) builds a subword vocabulary by repeatedly merging the most frequent adjacent symbol pair, turning rare words into reusable pi

Machine Learning

Bytecode Virtual Machine · A fake CPU made of software — the loop behind Python and the JVM

A bytecode virtual machine executes a compact stream of compiled instructions on a software stack machine — the dispatch loop that runs Python, the JV

Compilers

Byzantine Fault Tolerance (PBFT)

Byzantine fault tolerance lets a distributed system reach agreement even when up to f of its nodes lie, crash, or send conflicting messages. PBFT need

Distributed Systems

CAP Theorem · The forced choice every distributed database has to make

The CAP theorem says a distributed data store cannot simultaneously offer linearizable consistency, total availability, and tolerance to network parti

Distributed Systems

CDC 6600 Scoreboarding · The First Dynamic Instruction Scheduler

CDC 6600 scoreboarding explained: how the first out-of-order CPU (1964, Seymour Cray) dynamically scheduled instructions, tracked RAW/WAR/WAW hazards,

Computer Architecture

CLH Lock · Implicit Queue Spinlock with Predecessor Flags

The CLH lock is a scalable, FIFO queue-based spinlock where each thread spins on its predecessor's flag. Learn how it works, its O(1)-per-acquire comp

Concurrency

COBS Encoding · Consistent Overhead Byte Stuffing — zero-byte elimination for serial framing

COBS (Consistent Overhead Byte Stuffing) eliminates zero bytes from a data stream so 0x00 can serve as an unambiguous frame delimiter. Adds at most 1

Encoding

CORS (Cross-Origin Resource Sharing) · Browsers block cross-origin XHR by default — server's headers grant exceptions

CORS is a browser security mechanism that restricts JavaScript on origin A from reading responses from origin B unless origin B explicitly permits it

Web

CPU Pipelining · An assembly line for instructions — overlap the stages, finish one every cycle

CPU pipelining overlaps the fetch, decode, execute, memory, and write-back stages of consecutive instructions so a new instruction can finish almost e

Computer Architecture

CQRS: Command Query Responsibility Segregation · Two models, one truth — optimize writing and reading independently

CQRS (Command Query Responsibility Segregation) splits an application into a write model that handles commands and a separate read model that serves q

Distributed Patterns

CRC (Cyclic Redundancy Check) · Polynomial-division checksum — the error-detection workhorse of Ethernet, ZIP, and PNG

CRC is a checksum that treats data as a polynomial and emits the remainder of dividing by a fixed generator. CRC-32 (poly 0x04C11DB7) catches all sing

Error Correction

CRDTs (Conflict-free Replicated Data Types) · Replicas that always agree without ever asking each other

CRDTs are data structures whose replicas converge to the same state under any order of merges. They turn distributed conflict resolution from a runtim

Distributed Systems

CSRF and the Double-Submit Cookie Defense, Step by Step

CSRF and the double-submit cookie explained: how the stateless token defense works step by step, its cookie-injection failure mode, HMAC-signed sessio

Security

CUDA & the SIMT Model · Thousands of threads, one instruction stream — and a warp of 32 that moves as one

CUDA's SIMT model runs thousands of GPU threads in lockstep groups of 32 called warps — one instruction stream drives every thread, so divergent branc

Computer Architecture

Cache Associativity · Where can a memory block live in the cache — and why the answer decides your hit rate

Cache associativity decides where in the cache a memory block is allowed to live: direct-mapped (exactly one slot), fully associative (any slot), or t

Computer Architecture

Cache Coherence · How private L1 caches conspire to look like one shared memory.

Every core on a modern CPU has its own L1 cache. Without coordination, two cores could hold two different versions of the same memory address. Cache c

Systems

Cardinality Estimation · Equi-Depth Histograms and Selectivity Math

Equi-depth histograms and selectivity math explained: how query optimizers estimate cardinality, the uniform-within-bucket assumption, complexity, and

Databases

Catmull-Clark Subdivision Surfaces · Smooth Meshes from Coarse Control Cages

Catmull-Clark subdivision surfaces explained: the refinement rules, face/edge/vertex point formulas, complexity, extraordinary vertices, and use in Pi

Computer Graphics

Centroid Decomposition · Halve the tree at every step — log N depth, distance queries in seconds

Centroid decomposition recursively splits a tree at its centroid — the node whose removal leaves balanced subtrees. The result is a recursion tree of

Data Structures

Chain Replication · A straight line that turns N replicas into one strongly-consistent store

Chain replication arranges replicas in a linear chain: writes enter at the head and propagate node-by-node to the tail, while all reads are served by

Distributed Systems

Chain-of-Thought Prompting · Make the model show its work — and watch hard-problem accuracy jump

Chain-of-thought prompting asks a language model to write out its intermediate reasoning steps before the final answer, which sharply raises accuracy

Machine Learning

Change Data Capture · Stream every row change without polling — straight from the WAL

Change Data Capture (CDC) streams every row change in a database directly from the WAL or binlog. Debezium, Maxwell, Postgres logical replication. The

Distributed Systems

Chu-Liu/Edmonds · Minimum Spanning Arborescence on Directed Graphs

The Chu-Liu/Edmonds algorithm finds the minimum spanning arborescence of a directed graph: how cycle contraction and reweighting work, complexity O(VE

Graph Algorithms

Circuit Breaker · Wrap an unreliable dependency in a state machine — fail fast, recover safely

A circuit breaker wraps unreliable remote calls. Trips OPEN after a failure threshold, returns immediate errors for ~30 s, then half-OPEN allows one p

Distributed Patterns

Closures · A function that remembers where it was born

A closure is a function bundled with a reference to the variables from the scope where it was defined, so it can read and mutate that captured environ

Type Systems

Cohen-Sutherland Line Clipping · 4-Bit Outcodes Against a Viewport

Cohen-Sutherland line clipping explained: 4-bit outcodes, the nine-region scheme, trivial accept/reject, complexity, worked step trace, and how it com

Computer Graphics

Columnar Storage · Turn the table on its side so analytics reads only what it needs

Columnar storage lays each column out contiguously on disk instead of each row, so analytic queries read only the columns they touch and compress 5–20

Databases

Compare-and-Swap (CAS) · One CPU instruction reads, compares, and conditionally writes — atomically

Compare-and-swap (CAS) is a hardware-level atomic instruction that takes a memory location, an expected value, and a new value: it writes the new valu

Concurrency

Compilation Pipeline · Source → Machine Code

Lex → parse → AST → IR → optimize → codegen → assemble → link. Each stage transforms the representation. Every modern compiler — GCC, Clang, Rustc — f

Theory

Completely Fair Scheduler · A red-black tree, one virtual clock per task, and a promise

The Completely Fair Scheduler is Linux's default CPU scheduler since 2.6.23. It tracks vruntime per task and runs whichever has the smallest, indexed

Scheduling

Condition Variable · Sleep on a predicate, release the lock, wake on a signal

A condition variable lets a thread sleep until a predicate becomes true, atomically releasing the held mutex and re-acquiring it on wakeup. Spurious w

Concurrency

Connectionist Temporal Classification (CTC) · Learn the alignment you were never given

Connectionist Temporal Classification (CTC) trains sequence models on unsegmented data by summing the probability of every valid alignment between a l

Machine Learning

Consistent Hashing · Add or remove a server, move only 1/N of the keys

Consistent hashing maps both keys and servers onto a ring so that adding or removing a server moves only 1/N of the keys, not all of them. It's the te

Data Structures

Constant-Time Cryptography · The algorithm is correct — but the clock is leaking your key

Constant-time cryptography writes code whose running time and memory-access pattern never depend on secret data, so an attacker measuring the clock or

Cryptography

Content Delivery Network (CDN) · 300+ edge locations globally — drop latency from 200ms to 10ms

A content delivery network (CDN) is a globally distributed network of edge servers (Points of Presence, PoPs) that cache and serve static or dynamic c

Networking

Context Switch · The work the kernel does when one thread leaves the CPU and another arrives.

A context switch is the operation by which a CPU stops executing one thread, saves its state into memory, loads another thread's saved state, and resu

Systems

Context-Free Grammars · The recursion rules that turn flat text into nested trees

A context-free grammar is a set of production rules that rewrite a single nonterminal into strings of symbols, generating nested, recursive structure

Theory

Continuation-Passing Style · Make "what happens next" a value you can pass around

Continuation-passing style (CPS) is a code transformation where every function takes an extra argument — a continuation — that says what to do with th

Compilers

Contrastive Learning · Teach a model what's the same and what's different — and skip the labels

Contrastive learning trains an encoder to map matching pairs (augmentations of the same image) close together and mismatched pairs far apart in embedd

Machine Learning

Control Flow Graph · The map every optimizer reads before it touches your code

A control flow graph models a program as basic blocks — straight-line code with single entry and exit — connected by branch edges, giving compilers th

Compilers

Control Groups (cgroups) · Limit, account, and isolate CPU, memory, I/O for groups of processes

Control groups (cgroups) are a Linux kernel feature that limits, accounts for, and isolates the resource usage of a group of processes — CPU time (cpu

Operating Systems

Convex Hull (Graham Scan) · Sort by angle, walk the points, and turn only left

The Graham scan finds the convex hull of a point set in O(n log n) by anchoring on the lowest point, sorting the rest by polar angle, and walking the

Computational Geometry

Convolutional Neural Network (CNN) · Slide a tiny filter, share its weights, and let edges grow into objects

A convolutional neural network slides small learnable filters across an image, sharing weights to build a hierarchy of features — edges, then textures

Machine Learning

Copy-on-Write · Pretend to copy. Pay for it only if someone writes.

Copy-on-write (CoW) shares one underlying buffer between two logical owners and lazily duplicates it the moment either attempts to mutate. The kernel

Systems

Coroutines · Functions that pause themselves and pick up where they left off

Coroutines are functions that suspend themselves with yield and resume later. They cost ~50 ns per switch, compared to ~1-5 µs for OS threads. Stackle

Async Runtime

Cost-Based Query Optimizer · The component that decides how to run your SQL — before a single row moves

A cost-based query optimizer chooses an execution plan by estimating the cost of join orders and access paths from table statistics, then picking the

Databases

Count-Min Sketch · Frequency estimates in d × w counters — always an upper bound

The Count-Min Sketch is a sub-linear memory frequency estimator. d hash functions × w columns of counters; query returns min of d cells. Always overes

Probabilistic Data Structures

Cross-Validation · Stop trusting one lucky split — rotate the test set and average

Cross-validation rotates which slice of data is held out for testing, so your accuracy estimate isn't a lucky split. K-fold averages k train-test cycl

Machine Learning

Cuckoo Hashing · Two hashes, two homes, evict on collision

Cuckoo hashing is an open-addressing hash table that uses two hash functions and evicts incumbents like a cuckoo bird. It guarantees worst-case O(1) l

Data Structures

DFA vs NFA and Subset Construction

A DFA and an NFA are two models of finite automata that recognize exactly the same class of languages — the regular languages. The subset (powerset) c

Theory

DHCP

DHCP (Dynamic Host Configuration Protocol) automatically leases an IP address, subnet mask, default gateway, and DNS servers to a host over UDP ports

Networking

DNS Resolution · Name → IP

A recursive resolver walks from root → TLD → authoritative name server to translate a domain into an IP. Cache aggressively, because every browser req

Networking

DNS over HTTPS (DoH) · Hiding your lookups in plain sight — DNS that looks like every other HTTPS request

DNS over HTTPS (DoH) tunnels your DNS queries inside an encrypted HTTPS connection (RFC 8484) so eavesdroppers on the network can't see which sites yo

Networking

DNSSEC · A cryptographic paper trail from the root to the record

DNSSEC adds public-key signatures to DNS so a resolver can cryptographically verify that an answer came from the real zone owner and wasn't forged or

Networking

DPLL SAT Solver · The 1962 backtracking search that still powers every SAT solver on Earth

DPLL is a backtracking search that decides boolean satisfiability by guessing a variable's value, propagating forced unit clauses, and backtracking on

Theory

Dancing Links · Knuth's pointer trick — remove and restore in O(1)

Knuth's dancing links is a doubly linked list trick that removes and restores nodes in O(1) by preserving each node's neighbor pointers. The engine be

Combinatorial Algorithms

Data Deduplication · Hash each chunk, store identical chunks once — how backups shrink 10-50×

Data deduplication splits files into chunks, hashes each, and stores identical chunks only once. VM backups shrink 10-50× because most disk pages repe

Storage Systems

Database Normalization

Database normalization is the process of structuring relational tables to eliminate redundancy and update anomalies by decomposing them according to f

Databases

Database Sharding · One database, many machines, one shard key

Database sharding splits one logical database across many physical machines so that no single node has to hold all the data or absorb all the traffic.

Databases

Deadlock · Dining Philosophers

Five philosophers, five forks, a circular wait — no one can eat. The four conditions for deadlock: mutual exclusion, hold and wait, no preemption, cir

Systems

Decision Tree · A flowchart the machine writes for itself — every split chosen to cut confusion

A decision tree is an interpretable classifier that recursively splits data on the feature that most reduces impurity, building an if-then flowchart w

Machine Learning

Deep Q-Networks (DQN) · The algorithm that learned to play Atari from raw pixels — and made deep reinforcement learning work

A Deep Q-Network (DQN) is a reinforcement-learning agent that uses a convolutional neural net to approximate the action-value function Q(s,a) from raw

Machine Learning

Delaunay Triangulation · Empty circumcircles, maximum minimum angle

Delaunay triangulation connects points into triangles whose circumcircles contain no other point. Maximizes minimum angle, avoids slivers. Dual to Vor

Computational Geometry

Depth-First Search · DFS

3D graph of connected nodes. DFS dives deep along one path using a stack, then backtracks when it hits a dead end. Show the visited path glowing as it

Algorithms

Differential Privacy · Mathematically proven privacy — by adding exactly the right amount of noise

Differential privacy is a mathematical guarantee that a query's output barely changes whether or not any single person is in the dataset, achieved by

Security

Diffie-Hellman Key Exchange · Compute g^(ab) mod p without ever transmitting a or b

Diffie-Hellman key exchange (DH), invented by Whitfield Diffie and Martin Hellman in 1976 (with prior work by Ralph Merkle), is the first published pu

Cryptography

Diffusion Models · Teach a network to undo noise, then hand it static and watch a picture appear

A diffusion model generates data by learning to reverse a step-by-step noising process: it trains a neural network to predict the noise added at each

Machine Learning

Digital Signatures (ECDSA) · Sign with a secret, verify with a public point — and never, ever reuse the nonce

ECDSA proves a message came from the holder of a private key: a one-time nonce maps the message hash onto an elliptic curve so anyone can verify it wi

Cryptography

Dijkstra's Algorithm · shortest path

3D graph with weighted edges. The frontier expands, edges relax, and the shortest path lights up green.

Algorithms

Dinic's Max Flow · Push a whole layer of flow at once, not one path at a time

Dinic's algorithm computes maximum flow by repeatedly building a BFS level graph and saturating it with a blocking flow, giving an O(V²E) bound that d

Graph Algorithms

Dining Philosophers · Five forks, five seats, and the deadlock everyone reinvents

The dining philosophers problem is Dijkstra's 1965 concurrency puzzle: five philosophers share five forks and deadlock the instant each grabs its left

Concurrency

Direct Memory Access (DMA) · Network cards and SSDs read/write RAM directly — the CPU only orchestrates

Direct Memory Access (DMA) is a hardware mechanism allowing peripherals (NICs, SSDs, GPUs) to read/write system memory directly without involving the

Computer Architecture

Distributed Lock · Mutual exclusion across machines — and the TTL trap that breaks naive implementations

Distributed locks provide mutual exclusion across processes and machines. Redis Redlock, ZooKeeper, etcd, DynamoDB. The fundamental gotcha: TTL on the

Distributed Systems

Dominator Tree · Finding Which Blocks Must Execute Before Each Node

Dominator tree explained: how compilers find which basic blocks must execute before each node, the Lengauer-Tarjan and Cooper-Harvey-Kennedy algorithm

Compilers

Dropout · Randomly kill half the neurons each step — and the network stops memorizing

Dropout is a regularization technique that randomly switches off a fraction of neurons on each training step, forcing the network to spread its repres

Machine Learning

Dutch National Flag · Three-Way Partitioning in One Pass

The Dutch National Flag algorithm (Dijkstra, 1976) sorts three-valued arrays in one O(n) pass with three pointers. How it works, complexity, and its r

Algorithms

Dynamic Programming · Solve Once, Reuse

Dynamic Programming explained in 3D — watch a recursion tree explode with duplicates, then collapse with memoization. Interactive animation on Unseel.

Computer Science

ECC Memory · Hamming SEC-DED on every DRAM access — the silent defender against bit rot

ECC memory uses Hamming SEC-DED codes — 64 data bits plus 8 parity bits per word — to silently correct any single-bit flip and detect any double-bit f

Memory Architecture

ELF Dynamic Linking · How the PLT and GOT Resolve Symbols at Runtime

ELF dynamic linking explained: how the PLT and GOT work together with the dynamic linker to resolve shared-library symbols at runtime via lazy binding

Operating Systems

Edit Distance (Levenshtein) · The fewest keystrokes that turn one word into another

Edit distance, or Levenshtein distance, is the minimum number of single-character insertions, deletions, and substitutions needed to turn one string i

Algorithms

Edmonds-Karp · Ford-Fulkerson, but with BFS — a polynomial max-flow guarantee

Edmonds-Karp is Ford-Fulkerson with BFS — each augmenting path is the shortest in edge count. The result: a guaranteed O(VE²) bound and a clean polyno

Graph Algorithms

Elliptic Curve Cryptography (ECC) · Equivalent security to 3072-bit RSA in just 256 bits

Elliptic Curve Cryptography (ECC) replaces the multiplicative group of integers mod p with the additive group of points on an elliptic curve y² = x³ +

Cryptography

Encryption · Lock & Key

Encryption explained in 3D — watch a readable message pass through a lock and emerge as garbled ciphertext. Symmetric keys, RSA public-key cryptograph

Computer Science

Euler Paths and Hierholzer's Algorithm · Euler Paths and Hierholzer's Algorithm

An Euler path traverses every edge of a graph exactly once. Learn the odd-degree condition, why the Konigsberg bridges have no such walk, and how Hier

Graph Algorithms

Euler Tour Tree · Flatten a tree so every subtree is a contiguous range

Euler tour linearizes a tree by DFS so any subtree maps to a contiguous range [in[v], out[v]]. Pair with a segment tree to answer subtree sum, max, or

Graph Algorithms

Event Loop · One thread, ten thousand connections — and never a moment spent waiting

The event loop is a single-threaded scheduler that runs callbacks from a queue as I/O completes, letting one thread juggle thousands of concurrent con

Concurrency

Event Sourcing · Don't store state — store events; replay them to reconstruct any version

Event sourcing is an architectural pattern where the source of truth is an append-only log of immutable events (e.g., OrderPlaced, PaymentReceived, Or

Distributed Systems

Event-Driven Architecture · Services publish events to a bus; subscribers fan out — the integration model behind every modern microservices platform

Event-driven architecture is a pattern where services communicate by publishing and subscribing to events on a shared bus (Kafka, RabbitMQ, EventBridg

Event-Driven

Exactly-Once Delivery · Impossible in theory, achievable in practice — three paths to effectively-once

Exactly-once delivery is impossible without coordination — but achievable in practice via idempotent consumers plus dedup keys, or Kafka's transaction

Distributed Systems

Expectation-Maximization (EM) · Guess the hidden labels, refit the model, repeat — and the likelihood can only go up

Expectation-Maximization (EM) is an iterative algorithm that fits maximum-likelihood parameters when data has hidden variables, alternating an E-step

Machine Learning

Explicit Congestion Notification (ECN) · Marking Packets Instead of Dropping Them

Explicit Congestion Notification (ECN) explained: how routers mark IP packets instead of dropping them, the ECT/CE codepoints, TCP ECE/CWR handshake,

Networking

FIRST and FOLLOW Sets · Building the LL(1) Predictive Parse Table

FIRST and FOLLOW sets explained: how these two grammar sets are computed and used to build the LL(1) predictive parse table for top-down parsing, with

Compilers

False Sharing · Two threads write to neighboring bytes — cache coherence forces invalidation pings

False sharing happens when two CPUs each write to logically-independent variables that reside on the same cache line (typically 64 bytes on x86). Even

Concurrency

Fast Fourier Transform · The O(n²) → O(n log n) trick that changed signal processing

The Fast Fourier Transform computes the discrete Fourier transform in O(n log n) time instead of O(n²). At n = 220, that's ~20 million operations inst

Algorithms

Federated Learning · Train one model on a billion phones — without their data ever leaving

Federated learning trains one shared model across millions of devices by sending model updates instead of raw data: each device runs local SGD, a serv

Machine Learning

Feistel Network · Build a cipher once, and it decrypts itself

A Feistel network splits a block in half and mixes the halves through several rounds using a round function and subkeys, so the exact same structure d

Cryptography

Fencing Tokens · Stopping a Stale Lock Holder From Corrupting State

Fencing tokens explained: how a monotonically increasing lock token stops a stale or paused client from corrupting shared state, with worked example,

Distributed Patterns

Fenwick Tree (Binary Indexed Tree) · Twelve lines of bit-tricks for O(log n) prefix sums

A Fenwick tree, also called a binary indexed tree, supports point updates and prefix sums on an array in O(log n) per operation using just one array o

Data Structures

Fibonacci Heap · Lazy melding + cascading cuts achieve O(1) amortized insert and decrease-key

A Fibonacci heap is a priority queue with amortized O(1) insert, find-min, decrease-key, and merge, and amortized O(log n) extract-min. Designed by Fr

Data Structures

Finite State Machine · States & Transitions

A finite set of states connected by labeled transitions. Triggered by inputs, the machine moves through states deterministically. Models traffic light

Theory

Fisher-Yates Shuffle · The only correct way to randomly permute an array

Fisher-Yates produces every one of n! permutations with equal probability in O(n) time using one swap per position. Knuth's algorithm 3.4.2 — the only

Sampling Algorithms

FlashAttention · Exact attention that never builds the matrix it's famous for

FlashAttention computes exact attention without ever materializing the N×N score matrix, tiling queries, keys, and values through fast on-chip SRAM wi

Machine Learning

Floating-Point (IEEE 754) · Sign, exponent, mantissa — and why 0.1 + 0.2 isn't 0.3

IEEE 754 floating-point stores a real number as a sign bit, a biased exponent, and a fraction (mantissa), encoding value = ±1.f × 2^(e−bias) — which i

Computer Architecture

Floyd-Warshall · All-Pairs Shortest Path

A triple loop over all pairs and intermediate vertices — O(V³) dynamic programming that fills a complete distance matrix. The textbook example of DP o

Algorithms

Ford-Fulkerson Max Flow · Find paths, push flow, repeat — until you can't

Ford-Fulkerson computes the maximum flow in a directed network by repeatedly pushing flow along augmenting paths in the residual graph. Implemented wi

Algorithms

Futex · Fast Userspace muTEX — the syscall you only pay when contended

Futex is the Linux kernel primitive (since 2.5.7) that lets userspace lock fast-paths without syscalls and enters the kernel only when contention forc

Operating Systems

Futures & Promises · A handle to a value that hasn't arrived yet — so your code never has to wait for it

A future (or promise) is a placeholder object for a value that isn't ready yet, letting you register callbacks and compose asynchronous work without b

Concurrency Patterns

GELU Activation · The Gaussian-Gated Nonlinearity Behind Modern Transformers

GELU (Gaussian Error Linear Unit) explained: the x·Φ(x) activation behind BERT and GPT. Exact formula, tanh/sigmoid approximations, and how it beats R

Machine Learning

Garbage Collection · Mark and Sweep

Automatically reclaim memory objects the program can no longer reach. Mark from roots, sweep the unreachable. Modern GCs are generational — young obje

Systems

Gaussian Mixture Models · Clustering that admits doubt — every point gets a probability, not a label

A Gaussian mixture model represents data as a weighted blend of K Gaussian components, fit by the Expectation–Maximization algorithm in O(N·K·D²) per

Machine Learning

Gaussian Process Regression · Don't predict a line — predict every line that fits, then measure your own doubt

Gaussian process regression puts a distribution over functions: instead of one prediction it returns a mean plus a calibrated uncertainty band, exact

Machine Learning

Generational Garbage Collection · Most objects die young — so collect the nursery often and the old generation almost never

Generational garbage collection exploits the weak generational hypothesis — most objects die young — by splitting the heap into a young and old genera

Systems

Generative Adversarial Network (GAN) · Two networks at war — and the forgeries win

A generative adversarial network (GAN) trains two neural networks against each other — a generator that fabricates samples and a discriminator that ju

Machine Learning

Genetic Algorithms · Breed better answers — let bad ideas die and good ones have children

A genetic algorithm is a population-based optimizer that evolves candidate solutions over generations using selection, crossover, and mutation, tradin

Algorithms

Gossip Protocol · Each node randomly picks peers and shares state — full convergence in O(log N)

A gossip (epidemic) protocol disseminates information across a distributed cluster by having each node periodically pick a random peer and exchange st

Distributed Systems

Gradient Boosting · Stack a thousand mediocre trees and you get a champion

Gradient boosting builds a strong predictor by adding shallow trees one at a time, each fit to the negative gradient (the residual errors) of the loss

Machine Learning

Gradient Clipping · The seatbelt that keeps one bad batch from wrecking the whole run

Gradient clipping caps the size of the gradient before each weight update — by norm or by value — so a single huge step can't blow up training. It's t

Machine Learning

Gradient Descent · Iteratively step in the direction opposite the gradient — the workhorse of ML optimization

Gradient descent is the iterative optimization algorithm that minimizes a loss function L(θ) by repeatedly updating parameters θ in the di

Machine Learning

Graph Neural Network · Nodes that learn by listening to their neighbors

A graph neural network learns on graph-structured data by repeatedly passing messages between connected nodes: each node aggregates its neighbors' fea

Machine Learning

GraphQL · Single endpoint, schema-driven, fetch exactly what you need

GraphQL is a query language and runtime for APIs developed by Facebook in 2012 (open-sourced 2015). Unlike REST's resource-per-endpoint model, GraphQL

Web

Gray Code Counter · Binary code where consecutive values differ in exactly one bit

Gray code is a binary numbering system where consecutive values differ in exactly one bit. Used in mechanical rotary encoders, FSM state encoding, asy

Data Structures

Greedy Algorithm · Locally Optimal Choice

Make the best local choice at each step and hope it adds up. Works for coin change (US denominations), activity selection, Huffman coding, Dijkstra, K

Techniques

Green Threads · Millions of threads on a handful of CPUs

Green threads are user-space threads scheduled by a runtime instead of the kernel. Goroutines, Erlang processes, Java virtual threads. Millions per pr

Async Runtime

Group Normalization · Normalize per sample, not per batch — so a batch of one trains just as well as a batch of 256

Group Normalization splits a layer's channels into fixed groups and normalizes each group per sample, so it computes the same statistics whether the b

Machine Learning

HMAC · A secret key plus a hash — the standard way to prove a message wasn't tampered with

HMAC is a message authentication code built from a hash function and a secret key, hashing the message twice with key-derived inner and outer pads to

Cryptography

HTTP Request · Client → Server → Response

Method, path, headers, optional body — client sends. Status code, headers, body — server replies. Stateless by design, which is why cookies and tokens

Networking

HTTP/2 · One TCP connection, hundreds of multiplexed streams

HTTP/2 replaces HTTP/1.1's text protocol with binary frames over a single multiplexed TCP connection. HPACK compresses headers, but TCP head-of-line b

Networking

HTTP/2 · One connection, dozens of conversations at once

HTTP/2 multiplexes many requests over one TCP connection using binary framing and HPACK header compression, eliminating HTTP/1.1's head-of-line blocki

Networking

HTTP/3 · HTTP over QUIC over UDP — eliminates TCP head-of-line blocking, enables 0-RTT

HTTP/3 is the third major version of HTTP, standardized as RFC 9114 in June 2022. Unlike HTTP/2 (which uses TCP), HTTP/3 runs on QUIC (RFC 9000) — a U

Networking

Hamming Code

Hamming code is a linear block code that adds k parity bits to 2^k - k - 1 data bits, correcting any single-bit error. Hamming (7,4) corrects 1 error

Error Correction

Hardware Interrupts and ISRs

A hardware interrupt is an asynchronous electrical signal that forces the CPU to pause its current program, save context, and jump to an interrupt ser

Operating Systems

Hash Join · Build a hash table on one table, fire the other at it — and the n×m nested loop collapses to a single pass

A hash join matches rows from two tables by building an in-memory hash table on the smaller table's join key, then probing it with each row of the lar

Databases

Hash Table · Separate Chaining

3D animation showing how a hash table resolves collisions by chaining entries in linked lists per bucket.

Data Structures

Hazard Pointers · How lock-free readers stop the garbage collector that doesn't exist

Hazard pointers let lock-free readers publish the nodes they're using so no other thread frees that memory out from under them, solving the use-after-

Concurrency

Heap · Priority Queue

Heap data structure explained in 3D — watch extract-min, bubble-up, sift-down, and O(n) heapify in action. Interactive animation on Unseel.

Computer Science

Heapsort · O(n log n) guaranteed, O(1) extra space — the safety net under quicksort

Heapsort builds a max-heap from the array in O(n), then repeatedly extracts the max and places it at the end. It guarantees O(n log n) worst-case time

Algorithms

Heavy-Light Decomposition · Break a tree into log N chains — answer any path query in log² N

Heavy-light decomposition partitions a tree into paths so that any root-leaf path crosses O(log N) chains. With a segment tree per chain it answers pa

Data Structures

Hidden Markov Models · You never see the states — only the symbols they leak

A hidden Markov model (HMM) is a probabilistic model where an unobserved Markov chain of states emits observable symbols; the Viterbi algorithm recove

Machine Learning

Hilbert Curve · Continuous fractal that fills the unit square — adjacent indices always adjacent in 2D

The Hilbert curve is a continuous space-filling fractal that maps a unit interval onto the unit square, visiting every point with strong locality. Adj

Space-Filling Curves

Hindley-Milner · Infer the most general type — no annotations required

Hindley-Milner is the type inference algorithm at the heart of ML, Haskell, and OCaml. Algorithm W gathers constraints from an expression and unifies

Type Systems

Hinted Handoff · When a replica is down, a peer stores the write — and replays it when the replica returns

When a target replica is unreachable, another node stores a hint locally and replays it once the replica returns. Keeps writes alive during transient

Distributed Systems

Homomorphic Encryption · Compute on the locked box — and the answer comes out locked too

Homomorphic encryption lets you compute directly on encrypted data — add and multiply ciphertexts so that decrypting the result gives the same answer

Cryptography

Hopcroft-Karp · Bipartite matching in O(E√V) — many augmenting paths per phase

Hopcroft-Karp finds a maximum bipartite matching in O(E√V) — better than naive O(VE). Layered BFS picks the level structure, DFS finds vertex-disjoint

Graph Algorithms

Hopcroft-Tarjan Articulation Points · Cut vertices found in one DFS pass

The Hopcroft-Tarjan algorithm finds articulation points (cut vertices) — vertices whose removal disconnects a graph — in a single O(V+E) DFS using low

Graph Algorithms

Hopscotch Hashing · Neighborhood-Bounded Open Addressing

Hopscotch hashing explained: the 2008 Herlihy-Shavit-Tzafrir open-addressing scheme that bounds every key within an H-slot neighborhood using a hop-in

Data Structures

Huffman Coding · Frequent symbols, short codes — optimal prefix coding in O(n log n)

Huffman coding is a lossless compression scheme that assigns variable-length prefix codes to symbols by frequency. Build a min-heap, merge the two sma

Compression

Hybrid Logical Clock · Wall-clock milliseconds in the high bits, a Lamport counter in the low bits

A hybrid logical clock pairs wall-clock milliseconds with a Lamport-style logical counter. Preserves causality without TrueTime hardware. CockroachDB

Distributed Systems

HyperLogLog · Billion distinct items in 12 KB, with 1% error

HyperLogLog counts unique elements using just ~12 KB of memory for cardinalities up to 10^9, with ~1.625% standard error. Counts leading zeros in hash

Probabilistic Data Structures

Hypervisors and Virtualization

A hypervisor is the software layer that multiplexes one physical machine into many isolated virtual machines by controlling privileged instructions. C

Systems

I/O Multiplexing (select, poll, epoll, kqueue) · How one thread serves ten thousand sockets without breaking a sweat.

I/O multiplexing is the kernel facility that lets a single thread wait on many file descriptors and learn which are ready. select scans every fd on ev

Systems

ICMP and Ping

ICMP (Internet Control Message Protocol) is the error-reporting and diagnostic layer of IP. It carries echo request/reply (ping), TTL-exceeded (tracer

Networking

IP Multicast

IP multicast delivers a single packet stream to many receivers at once by addressing a group (224.0.0.0/4) instead of individual hosts. Routers replic

Networking

ISO 8601 Date Handling · The international format that ends timezone arguments and date-format wars

ISO 8601 specifies a date format YYYY-MM-DDTHH:MM:SS plus or minus HH:MM that is unambiguous, sortable, and machine-parseable. Foundation of JSON time

Encoding Standards

Idempotency Key · Safe retries for payments and APIs — the same key returns the same response

An idempotency key is a client-generated unique ID per request. The server processes the request once and caches the result; retries with the same key

Distributed Patterns

Implicit Treap · A treap that represents a sequence — split, merge, insert, reverse, all in O(log n)

An implicit treap represents a sequence using a treap whose in-order position serves as the key. Supports split, merge, insert at any index, delete ra

Data Structures

In-Context Learning · Teach a frozen model a new task with three lines of prompt

In-context learning is the ability of a large language model to learn a new task from a few examples placed in its prompt — adapting its behavior at i

Machine Learning

Inodes and Filesystem Layout

An inode is a fixed-size on-disk structure that stores a file's metadata and pointers to its data blocks — everything about a file except its name. Le

Systems

Insertion Sort · The sort everyone learns first — and the one your standard library secretly uses

Insertion sort builds a sorted array one element at a time by shifting larger items right and slotting each new element into place. It runs in O(n²) w

Algorithms

Interval Tree · Augmented BST for "what overlaps this range?"

An interval tree is a balanced binary search tree augmented with each subtree's maximum endpoint. It finds every interval overlapping a query range in

Data Structures

Introsort · Quicksort Speed With a Guaranteed O(n log n) Worst Case

Introsort explained: a hybrid sort that runs quicksort but switches to heapsort past a recursion-depth limit, guaranteeing O(n log n) worst case. Desi

Algorithms

Inverted Index · Term → docs, the data structure behind every search engine

An inverted index maps each term to the list of documents containing it. It's the data structure underneath every full-text search engine — Lucene, El

Databases

JIT Compilation · Compile at runtime — specialize on what actually runs

Just-in-Time compilation converts bytecode or IR to native machine code at runtime. Tiered pipelines — interpreter, baseline JIT, optimizing JIT — esc

Compilers

JSON Web Tokens (JWT) · The session that lives in the token, not the server

A JSON Web Token (JWT) is a signed, self-contained string of three Base64url parts — header.payload.signature — that carries claims so a server can ve

Web

Johnson's Algorithm · Reweight edges with Bellman-Ford, then run Dijkstra from each vertex

Johnson's algorithm computes shortest paths between all pairs of vertices in a sparse, possibly negatively-weighted directed graph. It runs Bellman-Fo

Graph Algorithms

Journaling File Systems · Write your intentions to a log before you act — so a crash can never leave the disk half-changed

A journaling file system writes intended changes to a log before touching the real on-disk structures, so a crash mid-write can be replayed or rolled

Systems

K-Means Clustering · Two steps, repeated until nothing moves — the workhorse of unsupervised learning

K-means clustering partitions n points into k groups by alternately assigning each point to its nearest centroid and recomputing each centroid as the

Machine Learning

K-Nearest Neighbors (KNN) · The algorithm with no training phase — it just remembers everything and asks the neighbors

K-Nearest Neighbors (KNN) classifies a point by a majority vote of its k closest labeled examples — no training, just distance. A lazy learner that st

Machine Learning

KV Cache · The one trick that turns quadratic LLM generation into linear — and eats all your GPU memory doing it

A KV cache stores the key and value tensors of every past token so a transformer can generate each new token in O(n) work instead of recomputing atten

Machine Learning

Kadane's Algorithm (Maximum Subarray) · Kadane's Algorithm (Maximum Subarray)

Kadane's algorithm finds the maximum-sum contiguous subarray in O(n) time and O(1) space by tracking the best sum ending at each index and resetti

Algorithms

Karatsuba Multiplication · Three products instead of four — and the quadratic wall comes down

Karatsuba multiplication multiplies two n-digit numbers with three recursive half-size products instead of four, dropping the schoolbook O(n²) cost to

Algorithms

Karger's Randomized Contraction Algorithm for Min Cut

Karger's randomized contraction algorithm for global min cut explained: how edge contraction works, the 2/(n(n-1)) success proof, O(n²) runs, and Karg

Graph Algorithms

Knapsack Problem · The fixed-weight bag that turned dynamic programming into a textbook reflex

The 0/1 knapsack problem picks a subset of items to maximize total value without exceeding a weight limit, solved by dynamic programming in O(nW) time

Algorithms

Knowledge Distillation · Compress a giant network into a tiny one by copying its hesitation, not just its answers

Knowledge distillation trains a small student network to mimic a large teacher's soft probability distribution — logits softened by a temperature T —

Machine Learning

Knuth-Morris-Pratt String Search · Find a pattern in a text without ever re-reading a character

The Knuth-Morris-Pratt algorithm finds a pattern of length m inside a text of length n in O(n + m) time, never re-examining a text character. The tric

Algorithms

Kosaraju's Strongly Connected Components · Two DFS passes, reverse-order on the transpose — every SCC falls out

Kosaraju's algorithm finds strongly connected components with two DFS passes — forward on the original graph, reverse on the transpose. It runs in O(V

Graph Algorithms

Kruskal's MST · Minimum Spanning Tree

Sort edges by weight, add smallest-first, skip any that would create a cycle. Union-find tracks connectivity in near-constant time. Optimal minimum sp

Algorithms

L1 & L2 Regularization · Two ways to punish big weights — one makes them vanish, one just shrinks them

L1 and L2 regularization add a penalty on weight size to a model's loss to curb overfitting: L1 (Lasso) drives weights exactly to zero for feature sel

Machine Learning

LR(1) Parsing · A stack, a state table, and one token of lookahead — the parser that swallowed every serious language

LR(1) parsing builds a parse tree bottom-up using a shift-reduce stack driven by a precomputed state table, deciding each step from one lookahead toke

Compilers

LRU Cache · Least Recently Used Eviction

A doubly linked list plus hash map delivers O(1) get, put, and evict. Access an item — it jumps to the front. Cache full — evict the back. Used everyw

Systems

LSTM Networks

An LSTM (Long Short-Term Memory) is a recurrent neural network that carries information across long sequences through a gated cell state. Forget, inpu

Machine Learning

LZW Compression · Streaming dictionary coder — no external table, just codes

LZW (Lempel-Ziv-Welch) is a dictionary-based lossless compressor that builds a code table on the fly. It emits only codes — the decoder rebuilds the s

Compression

Label Smoothing Regularization · Softening One-Hot Targets to Calibrate Neural Networks

Label smoothing explained: how softening one-hot targets to (1−ε)y + ε/K regularizes neural networks, improves calibration, and its tradeoff with know

Machine Learning

Lambda Calculus · A whole programming language built from one rule: substitute and repeat

Lambda calculus is a minimal language with just three constructs — variables, one-argument functions, and application — that is Turing-complete: every

Theory

Lamport Clocks · Each node has a counter; on send, increment + attach; on receive, max(local, received) + 1

A Lamport clock is a logical timestamp scheme that establishes a "happens-before" partial order across events in a distributed system without requirin

Distributed Systems

Layer Normalization · Per-Sample Feature Normalization for Sequence Models

Layer Normalization explained: how LayerNorm standardizes activations per-sample across features, its O(d) complexity, the γ/β formula, RMSNorm and Ba

Machine Learning

Leader Election · Bully algorithm, Raft term elections, ZooKeeper ephemeral nodes

Leader election is the problem of choosing a single coordinator from a group of distributed processes — necessary because operations like writes, lock

Distributed Systems

Leaky Bucket Rate Limit · FIFO queue draining at constant rate — smooth bursty input to a steady output

The leaky bucket is a FIFO queue that drains at a constant rate. Bursty traffic fills the bucket; output stays smooth at exactly rate r requests/sec.

Distributed Patterns

Lexer / Tokenizer · The first pass — where text becomes a stream of tokens

A lexer (tokenizer) is the first compiler stage: it scans raw source characters left-to-right with a finite-state machine and emits a stream of tokens

Compilers

Li Chao Tree · A segment tree that stores lines instead of numbers — the convex hull trick with no hull

A Li Chao tree is a segment tree over the x-axis where every node stores a single line, answering minimum-at-x (or maximum-at-x) queries in O(log C) b

Data Structures

Line Segment Intersection (Bentley-Ottmann) · Find every crossing among thousands of segments — without testing every pair

The Bentley-Ottmann algorithm reports all k intersections among n line segments in O((n + k) log n) time by sweeping a vertical line left to right, ke

Computational Geometry

Linearizability · The strongest single-object guarantee — every operation snaps to one real-time instant

Linearizability is the strongest single-object consistency model: every operation appears to take effect instantly at one point between its call and i

Distributed Systems

Link-Cut Tree · A dynamic forest that links, cuts, and path-queries in O(log n) amortized

A link-cut tree maintains a forest of rooted trees under link, cut, and path queries — all in O(log n) amortized. Sleator-Tarjan's preferred-path deco

Data Structures

Linked List · nodes

3D chain of floating nodes connected by glowing pointer arrows, showing insert and delete operations.

Data Structures

Linux Namespaces

Linux namespaces are the kernel isolation primitive behind containers: they give a process its own private view of a global resource — PIDs, network s

Systems

Locality-Sensitive Hashing · Hashes that collide on similar inputs — sub-linear nearest-neighbor search

LSH is a family of hashes where similar inputs collide with high probability, dissimilar with low. Banding on MinHash, hyperplanes for cosine, p-stabl

Probabilistic Algorithms

Lock-Free Data Structures · Guarantee global progress with atomic CAS — Treiber stack, Michael-Scott queue

A lock-free data structure guarantees that some thread always makes progress — no thread can be blocked indefinitely by another's stalling. It avoids

Concurrency

Log-Structured File Systems · Treat the whole disk as one append-only log — random writes become sequential ones

A log-structured file system treats the entire disk as one append-only log, turning random small writes into large sequential ones for fast writes — a

Systems

Log-Structured Merge · Append-only writes, tiered SSTables, background compaction — how modern KV stores absorb writes

A log-structured merge architecture pipes writes into an append-only log and tiered SSTables, then merges levels in the background. The technique behi

Storage Systems

Log-Structured Merge Tree · Trade read effort for sequential writes — the engine of modern key-value stores

An LSM tree buffers writes in memory, flushes them as immutable sorted files on disk, and merges those files in the background. It's how RocksDB, Cass

Data Structures

Logistic Regression · Bend a straight line into a probability — the linear classifier that refuses to die

Logistic regression fits a sigmoid to a weighted sum of features, mapping any input to a probability between 0 and 1 — the workhorse linear classifier

Machine Learning

Longest Common Subsequence

The longest common subsequence (LCS) is the longest sequence of characters that appears — in order but not necessarily contiguously — in two strings.

Algorithms

Longest Increasing Subsequence

The longest increasing subsequence (LIS) is the longest subsequence of an array whose elements are strictly increasing — not necessarily contiguous. A

Algorithms

Low-Rank Adaptation (LoRA) · Fine-tune a giant model by training two tiny matrices instead of all the weights

LoRA fine-tunes a giant model by freezing its weights and training two tiny low-rank matrices B and A whose product BA is added to each weight matrix

Machine Learning

Lowest Common Ancestor (Binary Lifting)

The lowest common ancestor (LCA) of two nodes in a rooted tree is their deepest shared ancestor. Binary lifting precomputes an up[node][2^k] sparse ta

Graph Algorithms

MCS Lock · The Scalable Queue-Based Spinlock That Fixed Cache-Line

MCS lock explained: the 1991 Mellor-Crummey & Scott queue-based spinlock where each thread spins on its own local flag, giving O(1) remote references

Concurrency

MESI Cache Coherence Protocol · Four states, one shared truth — how multicore caches avoid lying to each other

MESI is the cache coherence protocol that keeps multicore CPU caches consistent by tagging every cache line as Modified, Exclusive, Shared, or Invalid

Computer Architecture

MTU and IP Fragmentation · Ethernet's 1500-byte MTU forces routers (or senders) to split larger packets

The MTU (Maximum Transmission Unit) is the largest packet size a network link can carry without fragmentation — Ethernet defaults to 1500 bytes, IPv4

Networking

MVCC — Multi-Version Concurrency Control · Readers don't block writers, writers don't block readers

MVCC (multi-version concurrency control) lets a database run readers and writers concurrently without blocking each other by keeping multiple versions

Databases

Maglev Load Balancing · Google's load balancer that splits traffic evenly and barely flinches when a server dies

Maglev is Google's software load balancer that builds a fixed-size lookup table by consistent hashing, spreading connections almost perfectly evenly w

Networking

Manacher's Algorithm · Compute palindromic radii at every position in linear time, not O(n²)

Manacher's algorithm finds all palindromic substrings of a string s in O(n) time. The naive approach (expand around each center) is O(n²). Manacher's

String Algorithms

MapReduce · Map every record in parallel, shuffle by key, reduce each group — a petabyte scan as two pure functions

MapReduce is a programming model for processing huge datasets across a cluster: a map function emits key-value pairs in parallel, the framework shuffl

Distributed Systems

Marching Cubes · Turning a cloud of numbers into a triangle mesh, one cube at a time

Marching cubes extracts a triangle mesh from a 3D scalar field by classifying each cube cell's 8 corners as inside or outside the surface, then lookin

Computer Graphics

Mark-and-Sweep Garbage Collection · Trace everything you can still reach, then reclaim the rest

Mark-and-sweep is a tracing garbage collector that finds live memory by walking pointers from a set of roots, marking everything reachable, then sweep

Systems

Matrix Exponentiation · Skip a billion steps of a recurrence in about thirty multiplications

Matrix exponentiation raises a linear recurrence's transition matrix to the nth power in O(k³ log n) time, jumping billions of steps ahead in a sequen

Algorithms

Meet in the Middle

Meet in the middle is an exponential-time technique that splits a search space in half, enumerates each half in 2^(n/2), then combines the two sides w

Algorithms

Memoization · Cache Recursive Results

Recursion with a lookup table — turning exponential algorithms into linear ones. fib(40) drops from 2^40 operations to 40. The top-down form of dynami

Techniques

Memory Barriers (Fences) · Stop the CPU and compiler from rearranging your code across critical boundaries

A memory barrier (or fence) is an instruction that prevents the CPU or compiler from reordering memory operations across it. Modern CPUs (x86, ARM, PO

Concurrency

Memory Consistency Models · The contract that decides whether your two threads agree on what happened

A memory consistency model is the contract between hardware and software defining which reorderings of reads and writes one thread may observe in anot

Concurrency

Memory-Mapped I/O · Make a file act like an array

Memory-mapped I/O uses mmap to attach a file's pages directly into a process address space. Reads and writes become ordinary loads and stores; the ker

Systems

Memtable Flush · The atomic write-path step that turns random inserts into one sequential SSTable

Writes land in an in-memory memtable (a sorted map). When it hits ~64 MB, the engine flushes it as an immutable sorted SSTable on disk and resets. The

Storage Systems

Merge Sort · Divide and Conquer

Split the array in half, recursively sort each side, then merge the sorted halves. Guaranteed O(n log n), stable, predictable — used as the default so

Algorithms

Merkle Tree · Cryptographic Hash Tree

A binary tree where every node hashes its children. The root is a fingerprint of all the data. Prove any leaf exists with just log(n) hashes. Bitcoin,

Cryptography

Microservice Saga Orchestration · Two flavors of saga — events that trigger each other, or a central coordinator that drives them

A saga orchestrator drives a multi-step microservice transaction from a central coordinator (Temporal, Step Functions, Camunda). Choreography uses pee

Distributed Patterns

Miller-Rabin Primality Test · Ask a few random numbers to testify — and a 2048-bit prime confesses in milliseconds

The Miller-Rabin primality test is a fast randomized algorithm that decides whether a number is prime in O(k log³ n) time by checking k random witness

Algorithms

MinHash · Estimate set similarity in a few hundred bytes, not gigabytes

MinHash estimates Jaccard similarity between two sets in tiny constant memory. Hash every element, keep the minimum, repeat with k functions. P[match]

Probabilistic Algorithms

Mixture of Experts (MoE) · Hold a trillion parameters, pay for a billion — route each token to a few experts

A Mixture of Experts (MoE) replaces a dense feed-forward layer with many expert subnetworks plus a router that sends each token to just the top-k expe

Machine Learning

Mo's Algorithm · Sort queries by √n-block, sweep with two pointers — O((n+q)√n)

Mo's algorithm answers q offline range queries on an array of size n in total time O((n+q)√n) by reordering queries cleverly. Sort queries by (left/√n

Algorithms

Model Quantization · Trade a few decimal places for a model that fits on your phone

Model quantization stores and computes a neural network's weights in 8- or 4-bit integers instead of 32-bit floats, shrinking the model 4–8× and speed

Machine Learning

Modular Exponentiation · How a 2048-bit power that should take longer than the universe finishes in a millisecond

Modular exponentiation computes a^b mod m in O(log b) multiplications by repeatedly squaring and reducing — the workhorse of RSA, Diffie-Hellman, and

Algorithms

Monads · The pattern that threads context through a chain — and deletes the boilerplate

A monad is a design pattern for chaining computations that carry a context — optionality, errors, state, lists, or I/O — by threading the context thro

Theory

Monitor Pattern · An object that lets only one thread inside at a time — with condition variables for coordination

A monitor is an object whose methods are mutually exclusive — only one thread runs any monitor method at a time. Implicit lock + condition variables.

Concurrency Patterns

Monte Carlo Tree Search (MCTS) · Grow a game tree from random guesses — the planner that cracked Go

Monte Carlo Tree Search (MCTS) builds a search tree one node at a time using random rollouts, then balances exploration against exploitation with the

Machine Learning

Morton Curve (Z-Order) · Interleave x and y bits — get a 1D index that preserves 2D locality

The Morton curve, or Z-order, is a space-filling curve that maps multi-dimensional coordinates to a 1D index by interleaving bits. For 2D point (3, 5)

Space-Filling Curves

Mutex vs Semaphore · One says "I own this room." The other counts who's allowed in.

A mutex enforces mutual exclusion: one owner, one critical section, locked and unlocked by the same thread. A semaphore is a signed counter — threads

Systems

NAT — Network Address Translation · One public IP, thousands of private hosts

NAT lets many private hosts share one public IP by rewriting source ports on outbound packets. It's why your home router works, why P2P is hard, and w

Networking

NP-Completeness

NP-completeness marks the hardest problems in NP: they're in NP and NP-hard, so a polynomial-time algorithm for any one would solve them all. Learn Co

Theory

NUMA · Each socket has its own DRAM — local is fast, remote is slow

On NUMA hardware each socket has its own local DRAM. Local access is ~80 ns; reaching another socket's memory across UPI/Infinity Fabric is ~140 ns. P

Memory Architecture

Nagle's Algorithm · Buffer small writes until ACK or full segment — saves bandwidth, but causes 40 ms latency spikes

Nagle's algorithm (RFC 896, 1984, John Nagle) reduces small-packet inefficiency in TCP by buffering small writes until either (a) the buffer reach

Networking

Naive Bayes Classifier · A wrong assumption that trains in one pass — and still wins on text

A Naive Bayes classifier applies Bayes' rule while pretending every feature is independent given the class — a wrong assumption that still trains in O

Machine Learning

Neural Network Pruning · Throw away most of the model and keep almost all the accuracy

Neural network pruning deletes the weights that contribute least to a model's output, leaving a sparse network that runs faster and fits in less memor

Machine Learning

Neural Network · Learning Machine

Neural Networks explained in 3D — see signals cascade through layers, weights adjust, and backpropagation send errors backward. Interactive animation

Computer Science

Normalizing Flows · The only generative model that gives you the exact probability of a sample

A normalizing flow turns a simple distribution like a Gaussian into a complex one by pushing samples through a chain of invertible, differentiable lay

Machine Learning

OAuth 2.0 · Let an app act on your behalf — without ever handing it your password

OAuth 2.0 is a delegated authorization framework that lets an app act on your behalf by exchanging a short-lived authorization code for an access toke

Web

OSPF (Open Shortest Path First) · Every router builds the same map — then runs Dijkstra on it

OSPF is a link-state interior gateway protocol where routers flood link-state advertisements, build an identical map of the network, and run Dijkstra'

Networking

Oblivious Transfer · The 1-of-2 Primitive That Powers MPC

Oblivious Transfer explained: the 1-of-2 cryptographic primitive where a receiver gets one of two messages without the sender learning which. Protocol

Cryptography

Octree · Eight octants, recursively — the 3D quadtree

An octree subdivides 3D space into eight octants whenever a cell exceeds capacity. Used for 3D collision detection, point-cloud indexing, Minecraft ch

Spatial Data Structures

Out-of-Order Execution · The CPU doesn't run your program in the order you wrote it — and that's why it's fast

Out-of-order execution lets a CPU run independent instructions as soon as their inputs are ready instead of in program order, hiding cache-miss and di

Computer Architecture

Outbox Pattern · One transaction, two writes — without a distributed transaction

The outbox pattern writes a domain event to a same-database outbox table inside the business transaction, then a separate poller publishes to Kafka. O

Distributed Patterns

Ownership & Borrow Checking · Memory safety proved by the compiler — no garbage collector, no free()

Ownership and borrow checking are Rust's compile-time rules that guarantee memory safety without a garbage collector: every value has exactly one owne

Type Systems

P vs NP

P vs NP asks whether every problem whose solution can be verified in polynomial time can also be solved in polynomial time. It is the biggest open que

Theory

Packrat Parsing · Linear-Time PEG Parsing via Memoized Results

Packrat parsing explained: how memoizing every (rule, position) result turns backtracking PEG parsing into guaranteed O(n) time. Algorithm, complexity

Compilers

Padding Oracle Attack · Decrypting CBC Ciphertext Byte-by-Byte

Padding oracle attack explained: how a one-bit padding-valid signal lets an attacker decrypt CBC ciphertext byte-by-byte without the key. Mechanism, c

Security

Page Fault & Demand Paging · Memory you never paid for until you touched it

A page fault is a CPU trap into the kernel when a process touches a virtual page with no valid physical backing. Demand paging exploits this: pages ar

Operating Systems

Page Replacement Algorithms · When memory is full, which page do you throw away?

Page replacement algorithms decide which memory page to evict on a page fault when RAM is full — FIFO, LRU, the Clock approximation, and Belady's theo

Systems

PageRank · The steady state of a random surfer who occasionally teleports

PageRank ranks nodes in a graph by the steady-state probability of a random surfer landing on them. It made Google in 1998 and now powers citation ana

Algorithms

Paging · Translate every address in 30 cycles or less

Paging splits memory into fixed-size pages (typically 4 KB) and translates virtual addresses to physical via per-process page tables. The MMU walks th

Systems

Parity Check Bit · One extra bit, all odd errors caught — the simplest detection trick still in use

A parity bit appends one redundant bit so the total count of 1s is even (or odd). The simplest error-detection scheme — catches every single-bit flip,

Error Correction

Password Hashing (bcrypt, Argon2) · Make the hash so slow that a stolen database is worthless

Password hashing stores a password as a deliberately slow, salted one-way hash (bcrypt, scrypt, Argon2) so that a database breach hands attackers a us

Cryptography

Patience Sort and the Longest Increasing Subsequence

Patience sort explained: how the solitaire-inspired algorithm computes the Longest Increasing Subsequence in O(n log n) time using greedy piles and bi

Algorithms

Paxos Consensus · Two phases. One value. The algorithm that taught us consensus is hard.

Paxos is a family of consensus protocols that lets a set of unreliable processes agree on a single value despite crashes and partitions. Single-decree

Distributed Systems

Perlin Noise · The function that makes computers draw mountains, clouds, and marble

Perlin noise is a gradient-noise function that turns a lattice of random gradient vectors into smooth, natural-looking randomness — the math behind pr

Computer Graphics

Persistent Data Structures · Every update produces a new version while sharing structure

A persistent data structure preserves all previous versions when modified — every update returns a new version while sharing unchanged structure with

Data Structures

Persistent Segment Tree · Every version of the array survives — query any past state in O(log n)

A persistent segment tree keeps every historical version of the array available for query. Each update creates O(log n) new nodes that share unchanged

Data Structures

Phi Accrual Failure Detector · Suspicion as a Continuous Score

The Phi Accrual Failure Detector (Hayashibara et al., 2004) outputs a continuous suspicion score φ instead of alive/dead. Formula, algorithm, complexi

Distributed Systems

Phong Shading and Lighting

Phong shading is a per-pixel lighting technique that interpolates surface normals across a triangle and evaluates ambient + diffuse + specular lightin

Computer Graphics

Piece Table · Edits never move bytes — they splice pieces

A piece table represents an editable document with two immutable buffers plus a sequence of piece descriptors. Edits splice pieces — bytes never move.

Data Structures

Point-in-Polygon (Ray Casting) · Shoot a ray, count the crossings — odd is in, even is out

Ray casting decides whether a point lies inside a polygon by shooting a ray to infinity and counting edge crossings: odd means inside, even means outs

Computational Geometry

Positional Encoding · How a transformer learns that word order matters

Positional encoding injects word order into a transformer, which otherwise sees an unordered bag of tokens, by adding sinusoidal or learned vectors to

Machine Learning

Post-Quantum Cryptography

Post-quantum cryptography is the family of public-key algorithms designed to resist attacks by large quantum computers running Shor's algorithm, which

Cryptography

Pratt Parsing · Operator-Precedence Parsing with Binding Power

Pratt parsing explained: how top-down operator-precedence parsing uses binding power (nud/led) to parse expressions in O(n), with a worked step trace

Compilers

Prim's Algorithm · Grow MST one vertex at a time — O(E log V) with binary heap

Prim's algorithm builds a minimum spanning tree (MST) of a connected weighted graph by starting from any vertex and repeatedly adding the cheapest edg

Graph Algorithms

Principal Component Analysis (PCA) · Spin the data until its longest shadow lines up with an axis

Principal Component Analysis (PCA) is a linear dimensionality-reduction method that rotates data onto the orthogonal axes of greatest variance — the e

Machine Learning

Priority Inheritance · The protocol that rebooted a Mars rover until someone flipped one flag

Priority inheritance is a scheduling protocol where a low-priority task holding a lock temporarily inherits the priority of the highest-priority task

Concurrency

Priority Queue · Always pop the most urgent item — in O(log n)

A priority queue is an abstract data type that always returns the smallest (or largest) element in O(log n) time. The classic implementation is a bina

Data Structures

Process Lifecycle: fork, exec, wait · How Unix makes every program — clone, replace, reap

On Unix every new program is born the same way: fork clones the calling process, exec overwrites the clone with a new program image, and wait lets the

Systems

Process Scheduling · Hundreds of threads, eight cores, microsecond decisions

Process scheduling decides which runnable thread gets the CPU next. Modern kernels juggle hundreds of threads on a handful of cores using fairness alg

Systems

Proximal Policy Optimization (PPO) · Take the biggest step you can — then clip it before it hurts

Proximal Policy Optimization (PPO) is a clipped policy-gradient reinforcement learning algorithm that takes the biggest safe step toward a better poli

Machine Learning

Publish-Subscribe Pattern · One publisher, a topic, many subscribers — fan-out without coupling

Publish-subscribe (pub/sub) is a messaging pattern where publishers emit events to a topic without knowing who receives them; subscribers register int

Event-Driven

Push-Relabel Maximum Flow · No paths, no breadth-first search — just water flowing downhill

Push-relabel computes maximum flow without augmenting paths: it floods the source with a preflow, then repeatedly pushes excess downhill and relabels

Graph Algorithms

Pushdown Automaton · A finite-state machine that finally learned to count

A pushdown automaton is a finite-state machine augmented with a stack, giving it exactly the power to recognize context-free languages — the strings t

Theory

Q-Learning · Learn the value of every action — without ever modeling the world

Q-learning is a model-free, off-policy reinforcement learning algorithm that learns the value of each action by bootstrapping its own estimates toward

Machine Learning

QUIC · A reliable transport on UDP that fixes TCP's mistakes

QUIC is a transport protocol over UDP that bakes TLS 1.3 into the wire, multiplexes streams without TCP head-of-line blocking, and sets up in 1 RTT (o

Networking

Quadtree · Recursively split 2D space into four quadrants

A quadtree partitions 2D space by recursively splitting each region into four quadrants — northwest, northeast, southwest, southeast. It speeds up col

Data Structures

Quaternions for 3D Rotation · Four numbers that turn any object in space — and never lock up

A quaternion is a four-component number (w, x, y, z) that encodes a 3D rotation as a point on the unit hypersphere, rotating vectors with q·v·q⁻¹ with

Computer Graphics

Queue · FIFO

Animated queue showing enqueue and dequeue operations with elements flowing through in order.

Data Structures

Quick Sort · O(n log n)

3D visualization of quick sort. Pick a pivot element highlighted in gold, partition the array so smaller elements go left and larger go right, then re

Algorithms

Quickselect · Find the k-th element in linear time without sorting the whole array

Quickselect finds the k-th smallest element in an unsorted array in O(n) expected time without sorting the whole array. It's quicksort's partition ste

Algorithms

Quorum Consensus · Pick any read set R and write set W. If R + W > N, they must overlap.

Quorum reads (R) plus quorum writes (W) where R + W > N guarantees overlap and last-write-wins consistency. Dynamo, Cassandra, Riak. Interactive expla

Distributed Systems

Quotient Filter · Cache-Friendly Approximate Membership

Quotient filter explained: a cache-friendly Bloom filter alternative that stores key fingerprints via quotienting and Robin Hood hashing. Complexity,

Data Structures

R-Tree · Nested bounding rectangles — the GIS workhorse

An R-tree indexes spatial objects with nested minimum bounding rectangles. Queries prune subtrees whose MBR doesn't intersect. Branching M=50–100 give

Spatial Data Structures

RAID · Turn a pile of fallible disks into one fast, fault-tolerant volume

RAID combines several disks into one logical volume for speed or fault tolerance using striping, mirroring, and distributed parity — trading capacity,

Storage Systems

RCU — Read-Copy-Update · Lock-free readers, copy-on-write writers, grace-period reclaim

Read-Copy-Update lets readers run lock-free while one writer at a time atomically publishes new versions. Old versions are reclaimed after a grace per

Concurrency

REST API · Resources & Verbs

URLs are resources, HTTP methods are verbs. GET reads, POST creates, PUT replaces, PATCH modifies, DELETE removes. JSON carries the state. Simple enou

Web

ROC Curves & AUC · One curve, every threshold — and a single number that scores the whole classifier

A ROC curve plots a classifier's true positive rate against its false positive rate as you sweep the decision threshold; the area under it (AUC) is th

Machine Learning

RSA Encryption · Multiply two large primes; security rests on the apparent hardness of factoring back

RSA is the first widely-deployed public-key cryptosystem, invented by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT in 1977. Pick two large prime

Cryptography

Rabin-Karp String Search · Slide a hash, not the alphabet

Rabin-Karp finds a pattern inside a longer text by hashing a sliding window. A rolling hash updates in O(1) per shift, giving O(n+m) average time and

Algorithms

Radix Sort · Non-Comparison Sorting

Sort by digits — least significant first — bucketing each pass by one digit. Linear time O(nk) for k-digit numbers. Works because stable bucketing pre

Algorithms

Raft Consensus · A leader, a log, and a quorum — that's the whole algorithm

Raft is a consensus algorithm for replicated state machines that elects a single leader to serialize log entries across a cluster. It tolerates f fail

Distributed Systems

Random Forest · Average a crowd of overconfident trees — and the crowd is wise

A random forest is an ensemble that averages hundreds of decorrelated decision trees — each grown on a bootstrap sample with a random subset of featur

Machine Learning

Rasterization · How a 3D triangle becomes a wall of lit pixels — billions of times a second

Rasterization projects 3D triangles onto the screen and fills the pixels they cover, deciding inside/outside with edge functions and depth with a Z-bu

Computer Graphics

Rate Limiting (Token & Leaky Bucket) · Cap the request rate without punishing honest bursts — three algorithms, three trade-offs

Rate limiting caps how fast clients can hit a service. Token bucket allows bursts up to a capacity, leaky bucket smooths traffic to a constant rate, a

Networking

Ray Marching & Signed Distance Fields · Render a whole world from one math function — no triangles required

Ray marching renders implicit surfaces by stepping along each ray a distance read from a signed distance field, so the marcher never overshoots the su

Computer Graphics

Ray Tracing · Follow a single beam of light backward, and the whole image falls into place

Ray tracing renders an image by shooting a ray from the camera through every pixel into the scene, finding the nearest surface hit, then spawning shad

Computer Graphics

Read Repair · Catch stale replicas while you're already paying for the read

Read repair compares replica versions during a quorum read and pushes the latest to lagging replicas inline. Cheap eventual consistency fix that piggy

Distributed Systems

Read-Copy-Update (RCU) · The trick that makes a million readers cost nothing — and the writer wait

Read-Copy-Update (RCU) is a synchronization mechanism that lets readers run lock-free while a writer updates a private copy and atomically swaps in a

Concurrency

Read-Write Lock · Many readers can hold the lock simultaneously; writers exclude all

A read-write lock (RWLock) is a synchronization primitive that allows concurrent shared (read) access by multiple threads while ensuring exclusive (wr

Concurrency

Recurrent Neural Network (LSTM) · A network with a memory — and the gates that keep it from forgetting

A recurrent neural network processes sequences one step at a time, carrying a hidden state forward so each output depends on the whole past; LSTM gate

Machine Learning

Recursion · base case

3D call stack frames stacking up for factorial(5), then unwinding as values flow back down on return.

Concepts

Recursive Descent Parser · One function per grammar rule — the parser you write by hand

A recursive descent parser is a top-down LL parser written by hand — one mutually-recursive function per grammar nonterminal. Used in GCC, Clang, Type

Compilers

Red-Black Tree · Self-Balancing BST

A binary search tree where color rules and rotations enforce balance at every insert and delete. Height stays O(log n), used in Linux kernel, C++ STL

Data Structures

Red-Black vs AVL Tree · Same asymptote, opposite philosophies — strict balance vs looser balance

Red-black and AVL trees both guarantee O(log n) operations, but with different trade-offs. RB tolerates 2× height for cheaper inserts; AVL stays stric

Data Structures

Reed-Solomon Code · Symbol-level error correction over GF(2^m) — the code that survives burst damage

Reed-Solomon is a block error-correcting code over a finite field GF(2^m). RS(255,223) appends 32 parity bytes to correct up to 16 byte errors. Used i

Error Correction

Reference Counting · Free the object the instant nobody is looking — unless they're looking at each other

Reference counting tracks how many references point to each object and frees it the instant the count hits zero — giving deterministic, incremental me

Systems

Regex Matching · NFA Compilation

A regex pattern compiles to a state machine. Walk the input through the NFA's states — reach an accept state and the match succeeds. The engine under

Theory

Register Allocation · Unlimited virtual registers, sixteen physical ones — pick wisely

Register allocation maps a compiler's unlimited virtual registers to a CPU's fixed physical registers. Graph coloring (Chaitin) or linear scan (most J

Compilers

Register Renaming · Killing WAR and WAW Hazards with a Rename Map

Register renaming explained: how a rename map table maps architectural registers to a larger physical register file to eliminate WAR and WAW hazards i

Computer Architecture

Reinforcement Learning from Human Feedback (RLHF) · How a pile of "A is better than B" clicks turned GPT-3 into something you'd actually talk to

RLHF aligns a language model to human preferences in three stages: supervised fine-tuning, training a reward model from pairwise preference rankings,

Machine Learning

Reservoir Sampling · k uniformly random items from a stream of unknown length

Reservoir sampling picks k uniformly random items from a stream of unknown length in O(n) time and O(k) space. Each item has probability k/n of ending

Sampling Algorithms

Residual Networks (ResNet) · The trick that made 100-layer networks trainable — by learning the difference, not the whole

A residual network (ResNet) adds skip connections that let a layer learn a residual F(x) on top of its input x, so the output is F(x) + x — keeping gr

Machine Learning

Retrieval-Augmented Generation (RAG) · Give a language model an open book instead of a perfect memory

Retrieval-Augmented Generation (RAG) bolts a vector-search retriever onto a large language model so it answers from fetched documents instead of memor

Machine Learning

Retry with Exponential Backoff · Wait longer between attempts, randomize the wait — survive transient failures without a herd

Retry failed requests with exponentially increasing delays: 1s, 2s, 4s, 8s — plus random jitter to prevent synchronized retry storms. Used in AWS SDKs

Resilience Patterns

Return-Oriented Programming (ROP) · Turning a program's own code against it — no shellcode required

Return-oriented programming (ROP) is a code-reuse exploit that chains short instruction sequences already in memory — each ending in 'ret' — so an att

Security

Reverse Proxies · One public door in front of many private servers — terminating TLS, balancing load, caching, and hiding your topology

A reverse proxy is a server that sits in front of your backend servers, accepting client requests and forwarding them to one of several origins — term

Networking

Ring Buffer · Fixed-size circular queue, lock-free at 100M ops/s

A ring buffer is a fixed-size circular array with head and tail pointers that wrap modulo capacity. Lock-free SPSC variants hit 100M ops/s. Used in au

Data Structures

Robin Hood Hashing · Variance-Minimizing Open Addressing

Robin Hood hashing explained: the variance-minimizing open-addressing scheme that equalizes probe lengths by robbing rich keys to pay poor ones. Invar

Data Structures

Rope (data structure) · Balanced tree of string fragments — edit gigabytes in log time

A rope is a balanced binary tree whose leaves hold string fragments. By storing characters in leaves and the cumulative length in internal nodes, rope

Data Structures

Rotary Position Embedding (RoPE) · Encode position by spinning the vectors — so attention sees distance, not coordinates

Rotary Position Embedding (RoPE) encodes a token's position by rotating its query and key vectors by an angle proportional to position, so the attenti

Machine Learning

SHA-256 (Merkle-Damgard) · One-way, one fixed size, no matter how big the input

SHA-256 hashes any message to a fixed 256-bit digest by padding it, splitting it into 512-bit blocks, and chaining them through a one-way compression

Cryptography

SIMD · One instruction, many lanes — 4× to 16× speedup for data-parallel loops

SIMD packs many values into one register and applies one instruction to all of them — 4× to 16× speedup for data-parallel loops. SSE, AVX, AVX-512, NE

Computer Architecture

SSA Form · One name, one definition — the IR that powers modern optimization

Static Single Assignment is a compiler IR where every variable is assigned exactly once. φ-functions merge values at control-flow joins. The form that

Compilers

SSTable Format · An immutable, sorted, block-indexed, Bloom-filtered file — the page format every modern key-value store writes to disk

An SSTable (Sorted String Table) is an immutable on-disk file of sorted key-value pairs, split into compressed blocks, indexed by a sparse in-memory i

Storage Systems

SWIM Protocol · Scalable Gossip-Based Membership and Failure Detection

SWIM protocol explained: how gossip-based membership and failure detection achieves O(1) per-node message load and size-independent detection time, wi

Distributed Systems

Saga Pattern · A sequence of local transactions with compensating undo actions

A saga is a sequence of local transactions across multiple services where each transaction has a corresponding compensating transaction that semantica

Distributed Systems

Schnorr Signatures · The Linear Math Behind Taproot and MuSig

Schnorr signatures explained: the linear discrete-log signature behind Bitcoin Taproot, BIP-340, and MuSig key aggregation, with the algorithm, math,

Cryptography

Screen-Space Ambient Occlusion (SSAO) · Faking Contact Shadows from the Depth Buffer

Screen-Space Ambient Occlusion (SSAO) explained: how the depth-buffer trick from Crysis fakes contact shadows, its algorithm, complexity, HBAO/GTAO co

Computer Graphics

Segment Tree · Range queries and range updates, both in O(log n)

A segment tree stores aggregate values (min, max, sum, gcd) of every contiguous range over an array, supporting range queries and point or range updat

Data Structures

Selection Sort · Always slow on comparisons, always fast on writes — the sort for flash memory and EEPROMs

Selection sort repeatedly finds the minimum of the unsorted suffix and swaps it into place. It runs in O(n²) regardless of input, does only n swaps to

Algorithms

Selective Repeat ARQ · Lose one packet, resend one packet — not the whole window

Selective Repeat ARQ is a sliding-window reliable-transfer protocol that retransmits only the individual packets actually lost, buffering out-of-order

Networking

Seqlocks · Lock-Free Reads Using an Even/Odd Sequence Counter

Seqlocks explained: how Linux's even/odd sequence counter gives lock-free, non-blocking reads for read-mostly data, with mechanism, complexity, memory

Systems

Serializability · The correctness contract that lets databases run thousands of transactions at once

Serializability is the correctness criterion for concurrent transactions: a schedule is correct if its result is equivalent to running the transaction

Databases

Shamir's Secret Sharing · Cut a key into n pieces where any k rebuild it — and k−1 reveal nothing at all

Shamir's Secret Sharing splits a secret into n shares using a random degree-(k−1) polynomial over a finite field, so any k shares reconstruct it by in

Cryptography

Side-Channel Attacks · When the algorithm is perfect but the machine running it whispers the key

A side-channel attack recovers secrets not by breaking the math but by measuring the physical side effects of running it — timing, power draw, cache s

Cryptography

Simulated Annealing · Climb downhill mostly, uphill sometimes, and cool down

Simulated annealing is a probabilistic optimization method that escapes local minima by occasionally accepting worse moves. Borrowed from metallurgy —

Algorithms

Skip List · Randomized Balanced List

A linked list with multiple randomized levels creating express lanes — O(log n) expected time with code simpler than a balanced tree. Used in Redis so

Data Structures

Slab Allocator · Pre-allocate N identical objects per slab — turn alloc and free into O(1) list ops

A slab allocator pre-allocates contiguous slabs of identically-sized objects and serves alloc/free as O(1) pops from a free list. It was Jeff Bonwick'

Memory Allocation

Sliding Window · Subarray Technique

A window moves across the array one step at a time. Add entering element, remove leaving element — O(1) updates instead of recomputing. Turns O(nk) in

Techniques

Sliding Window Protocol · Keep the pipe full — send a batch, slide forward as ACKs land

The sliding window protocol lets a sender transmit up to W unacknowledged frames at once, sliding the window forward as ACKs arrive, so a fat link sta

Networking

Slotted Page Layout · Row Storage, Slot Directory, and In-Page Compaction

Slotted page layout explained: how databases store variable-length rows in fixed-size disk pages using a slot directory, indirection, and in-page comp

Storage Systems

Smallest Enclosing Circle (Welzl's Algorithm) · The minimum circle that covers everything — found in expected linear time

The smallest enclosing circle is the unique minimum-radius circle that covers every point in a set; Welzl's randomized incremental algorithm finds it

Computational Geometry

Snapshot Isolation · Every transaction reads a frozen world — until two of them quietly disagree

Snapshot isolation gives each transaction a frozen, consistent view of the database as of the moment it began, so readers never block writers — but it

Databases

Snowflake ID · 64 bits, three fields, decentralized, time-sortable

Snowflake IDs pack a 41-bit timestamp, 10-bit machine ID, and 12-bit sequence into a single 64-bit integer. Time-sortable, decentralized, 4096 IDs/ms/

Distributed Systems

Softmax & Cross-Entropy · Turn raw scores into probabilities, then measure how wrong they are

Softmax turns a vector of raw scores (logits) into a probability distribution; cross-entropy measures how far that distribution is from the true label

Machine Learning

Sort-Merge Join · Sort both sides once, then zip them together in a single pass

Sort-merge join joins two tables by sorting both on the join key, then merging them in a single synchronized pass with two cursors — O(n log n + m log

Databases

Spanner & TrueTime · The database that turned clock uncertainty into a number — and then waited it out

Spanner is Google's globally distributed database that uses TrueTime — a GPS-and-atomic-clock API exposing time as a bounded interval [earliest, lates

Distributed Systems

Spanning Tree Protocol · How switches agree to switch off cables — so the network stops eating itself

The Spanning Tree Protocol (STP, IEEE 802.1D) is a Layer-2 algorithm where switches elect a root bridge and cooperatively block redundant links, leavi

Networking

Sparse Table · O(1) range min/max queries with O(n log n) preprocessing

A sparse table is a data structure that answers idempotent range queries (min, max, gcd, bitwise-and, bitwise-or) in O(1) per query after O(n log n) p

Data Structures

Spatial Hashing · Stop comparing everything to everything — only check what's nearby

Spatial hashing buckets objects into a uniform grid by hashing each object's cell coordinates, so collision and neighbor queries only compare objects

Data Structures

Spectre & Meltdown · The CPU runs code it promised to throw away — and the cache remembers what it saw

Spectre and Meltdown are speculative-execution attacks: the CPU runs instructions it later discards, but the discarded work leaves a secret-dependent

Computer Architecture

Speculative Decoding · A small model guesses ahead; the big model checks the guesses for free

Speculative decoding speeds up large-language-model inference by having a small draft model propose several tokens at once, then verifying them in a s

Machine Learning

Speculative Execution · Run first, prove right later — the engine of high IPC, the door to Spectre

Speculative execution lets a CPU run instructions past unresolved branches, throwing away the wrong path. It buys high IPC but leaks data through cach

Computer Architecture

Spinlock · A lock that loops checking instead of sleeping — useful for short critical sections

A spinlock is a mutual-exclusion primitive that, when contended, busy-waits in a tight loop ("spins") rather than putting the thread to sleep. Impleme

Concurrency

Splay Tree · Self-adjusting BST — recently-used items become fast

A splay tree is a self-adjusting binary search tree that, after every access (search, insert, delete), "splays" the accessed node to the root via a se

Data Structures

Splay Tree Amortized Analysis · How a tree with zero balance invariants still costs O(log n) per operation on average

Why splay trees hit amortized O(log n) per operation despite having zero balance invariants. The access lemma, the potential function Phi = sum of ran

Data Structures

Sqrt Decomposition · Split the array into √N blocks — queries cost √N, updates cost one

Sqrt decomposition splits an array into √N blocks and stores aggregate-per-block. Updates are O(1), range queries are O(√N), and the code fits in 30 l

Data Structures

Stack · LIFO

3D animation showing push and pop operations on a stack, demonstrating the Last-In-First-Out principle.

Data Structures

Stack Canaries · A tripwire word that dies before your return address does

A stack canary is a secret value placed just before the saved return address; on a buffer overflow the canary is overwritten first, so the function ch

Security

Stoer-Wagner · Global Minimum Cut Without Max-Flow

Stoer-Wagner finds a graph's global minimum cut in O(V³) or O(VE + V²log V) without max-flow, using maximum-adjacency ordering and vertex merging. Exp

Graph Algorithms

Strassen's Matrix Multiplication · Seven products where the textbook needs eight — and the cubic barrier falls

Strassen's algorithm multiplies two n×n matrices with seven recursive products instead of eight, dropping the cost from O(n³) to O(n^2.807) and breaki

Algorithms

Strassen's Matrix Multiplication · Seven multiplications where the textbook needs eight — and cubic time cracks

Strassen's algorithm multiplies two n×n matrices using seven recursive multiplications per block instead of eight, dropping the schoolbook O(n³) cost

Algorithms

Stream Ciphers

A stream cipher encrypts data one bit or byte at a time by XOR-ing the plaintext with a pseudorandom keystream generated from a key and nonce. Learn L

Cryptography

Subnetting and CIDR

Subnetting splits a 32-bit IPv4 address into network and host bits; CIDR writes the boundary as a /prefix like 10.0.0.0/24. Learn subnet masks, VLSM,

Networking

Suffix Array · All n suffixes, sorted, in 4n bytes

A suffix array is the sorted list of every suffix of a string, stored as starting indices. Combined with an LCP array, it answers substring search, lo

Data Structures

Suffix Automaton · O(n) construction, O(n) states — minimal automaton accepting every substring

A suffix automaton (SAM) of string s is the smallest deterministic finite automaton that recognizes every suffix (and therefore every substring) of s.

String Algorithms

Suffix Tree (Ukkonen's Algorithm) · Every suffix in one tree — built left to right, in linear time

A suffix tree is a compressed trie of every suffix of a string, built in O(n) time by Ukkonen's algorithm, that answers "is P a substring?" in O(|P|)

String Algorithms

Superscalar Execution · One core, many instructions per tick — parallelism hiding inside a single thread

Superscalar execution issues multiple instructions per clock cycle to several parallel execution units on one core, exploiting instruction-level paral

Computer Architecture

Support Vector Machine (SVM) · The classifier that throws away almost all your data — and keeps the few points that matter

A support vector machine finds the maximum-margin hyperplane separating two classes, defined entirely by a handful of critical points called support v

Machine Learning

Swiss Tables · SIMD-Metadata Flat Hash Maps

Swiss Tables explained: the SIMD-metadata flat hash map from Google's Abseil that powers Rust and Go. How control bytes, SSE2 group scans, and quadrat

Data Structures

System Call · The 50-nanosecond gate between your code and the kernel

A system call is a controlled jump from user-space code into the kernel — the only way an unprivileged process can do I/O, allocate memory, fork, or t

Systems

TCP 3-Way Handshake · SYN

Three packets set up a reliable TCP connection. Client SYN sends a starting sequence; server SYN-ACK responds with its own; client ACKs to open the co

Networking

TCP BBR Congestion Control · Stop guessing from packet loss — measure the pipe and pace to it

TCP BBR is a model-based congestion control algorithm that probes for the bottleneck bandwidth and minimum round-trip time directly, pacing data to th

Networking

TCP Congestion Control · How TCP decides how fast to send

TCP congestion control decides how fast a sender pushes bytes onto a shared network. From Reno's loss-based AIMD to BBR's bandwidth-delay model, the a

Networking

TCP Selective Acknowledgment (SACK) · Recovering Multiple Losses Without Retransmitting the Whole

TCP SACK explained: how RFC 2018 selective acknowledgment lets a receiver report received byte ranges so the sender retransmits only lost segments, no

Networking

TCP Window Scaling · Breaking the 64 KB Receive-Window Ceiling on Fat Pipes

TCP Window Scaling (RFC 1323/7323) lifts the 64 KB receive-window limit to ~1 GB so TCP can saturate high-bandwidth, high-latency links. How it works,

Networking

TLB (Translation Lookaside Buffer) · A 64-1024-entry CPU cache for page table walks — miss costs 100+ cycles

The TLB is a CPU-level cache that stores recent virtual-address-to-physical-address translations. On every memory access, the CPU first checks the TLB

Computer Architecture

TLB Shootdown · Inter-processor flush — the scaling tax on every munmap

When one CPU modifies a page table entry, every other CPU holding stale TLB copies must flush. The IPI plus INVLPG round trip costs 1–10 µs and scales

Computer Architecture

TLS Handshake · Encrypted Channel Setup

ClientHello, ServerHello + certificate, key exchange, session key derivation. Asymmetric crypto establishes a symmetric session key — the foundation o

Networking

Tail Call Optimization

Tail call optimization (TCO) reuses the current stack frame when a function's last action is a call in tail position, turning recursion into itera

Compilers

Tarjan's Bridges · Find every disconnecting edge in one DFS pass

Tarjan's bridge algorithm finds every edge whose removal disconnects a graph — in a single O(V+E) DFS. Uses low-link values just like Tarjan's SCC. Th

Graph Algorithms

Tarjan's Strongly Connected Components · Find every cycle of mutual reachability in one DFS pass

Tarjan's algorithm finds all strongly connected components of a directed graph in a single DFS pass — O(V + E). It detects cycles in dependency graphs

Algorithms

Ternary Search

Ternary search finds the extremum (maximum or minimum) of a unimodal function by dividing the search interval into thirds and discarding one third eac

Algorithms

The ABA Problem · When "nothing changed" is a lie your lock-free code believes

The ABA problem is a concurrency bug where a compare-and-swap succeeds because a value changed from A to B and back to A, so CAS can't tell the memory

Concurrency

The Bias-Variance Tradeoff · Why the model that fits your training data best is rarely the one that predicts best

The bias-variance tradeoff explains why too simple a model underfits and too complex a model overfits: expected test error splits into bias squared, v

Machine Learning

The Binomial Heap

A binomial heap is a mergeable priority queue built as a forest of binomial trees. It unions two heaps in O(log n) by adding them like binary numbers,

Data Structures

The Birthday Attack

A birthday attack is a generic collision attack that finds two inputs hashing to the same value in about 2^(n/2) work instead of 2^n, exploiting the b

Cryptography

The Bitmap Index

A bitmap index stores one bit-vector per distinct column value, turning WHERE filters into hardware AND/OR/NOT on machine words. Ideal for low-cardina

Databases

The Boot Process (Firmware to Kernel) · The Boot Process

The boot process is the ordered handoff of control from firmware (BIOS/UEFI) through a bootloader (GRUB) to the OS kernel and PID 1. Learn POST, MBR v

Operating Systems

The CYK Parsing Algorithm

The CYK algorithm decides whether a string belongs to a context-free language and builds its parse table. It fills an n×n dynamic-programming table bo

Theory

The Chinese Remainder Theorem · Know the remainders, recover the number — exactly one answer fits

The Chinese Remainder Theorem says that if you know a number's remainders modulo several pairwise-coprime divisors, there is exactly one value below t

Algorithms

The Chomsky Hierarchy

The Chomsky hierarchy is a four-level containment ranking of formal grammars — regular, context-free, context-sensitive, and recursively enumerable —

Theory

The Chord Distributed Hash Table · Chord DHT

Chord is a distributed hash table that maps keys onto an m-bit identifier ring and locates any key in O(log n) hops using a finger table. Each key liv

Distributed Systems

The Convex Hull Trick

The convex hull trick is a dynamic-programming optimization that evaluates the minimum (or maximum) of a set of linear functions m·x + b at a query po

Algorithms

The Deque (Double-Ended Queue)

A deque (double-ended queue) is a sequence container that supports O(1) push and pop at BOTH the front and the back. It powers sliding-window algorith

Data Structures

The EEVDF Scheduler · How Linux runs a billion threads fairly — and still answers your keystroke in milliseconds

EEVDF (Earliest Eligible Virtual Deadline First) is Linux's default CPU scheduler since kernel 6.6: it grants each task a fair time slice, assigns a v

Systems

The Earley Parser

The Earley parser recognizes any context-free grammar — including ambiguous and left-recursive ones — by building a chart of dotted-rule states with p

Compilers

The Gale-Shapley Stable Matching Algorithm · Gale-Shapley Stable Matching

The Gale-Shapley algorithm solves the stable marriage problem: given two sets of n agents with ranked preferences, it produces a stable matching where

Algorithms

The Gap Buffer

A gap buffer is a text-editor data structure that stores a string in one array with a movable empty gap at the cursor, giving O(1) amortized insert an

Data Structures

The Halting Problem

The halting problem asks whether an arbitrary program halts or loops forever on a given input. Alan Turing proved in 1936 that no algorithm can decide

Theory

The Held-Karp TSP Algorithm · Held-Karp Algorithm

The Held-Karp algorithm solves the Travelling Salesman Problem exactly using bitmask dynamic programming, running in O(2ⁿ·n²) time and O(2ⁿ·n) space —

Algorithms

The Hungarian Algorithm · The optimal way to assign n workers to n jobs — without checking all n! permutations

The Hungarian algorithm finds the minimum-cost perfect matching in a weighted bipartite graph — the optimal assignment of n workers to n jobs — in O(n

Algorithms

The Kalman Filter · How a noisy sensor and a guess become a confident estimate

The Kalman filter is a recursive algorithm that fuses a noisy measurement with a motion model to estimate a hidden state in real time, optimally weigh

Machine Learning

The Master Theorem · Read the running time of a divide-and-conquer algorithm straight off its recurrence

The Master Theorem solves divide-and-conquer recurrences of the form T(n) = a·T(n/b) + f(n) by comparing f(n) against n^(log_b a): three cases give Θ(

Theory

The Nested Loop Join

A nested loop join pairs two tables by scanning the inner table once for every row of the outer table. The naive form is O(n·m); block and index neste

Databases

The OSI Model

The OSI model is a 7-layer reference framework that describes how data moves across a network, from the physical wire up to the application. Learn eac

Networking

The One-Time Pad

The one-time pad XORs a message with a truly random key as long as the message, used once. Shannon proved it offers perfect secrecy — provably unbreak

Cryptography

The Out-of-Memory Killer · When the RAM runs out, the kernel picks a process and pulls the trigger

The Linux out-of-memory (OOM) killer is a kernel last resort that, when physical memory and swap are exhausted, scores every process by a badness heur

Systems

The PACELC Theorem · CAP's sequel — the tradeoff you pay every millisecond, not just during a partition

PACELC extends the CAP theorem: if there is a network Partition (P), a system trades Availability (A) for Consistency (C); Else (E), in normal operati

Distributed Systems

The Pairing Heap

A pairing heap is a self-adjusting multiway tree that gives O(1) insert and merge, O(1) find-min, and amortized O(log n) delete-min — the fastest heap

Data Structures

The Producer-Consumer Problem

The producer-consumer problem is the classic concurrency puzzle of coordinating threads that add and remove items from a shared bounded buffer without

Concurrency

The Pumping Lemma

The pumping lemma is a proof technique that shows a language is NOT regular. Every regular language has a pumping length p such that any string of len

Theory

The Radix Tree (Patricia Trie) · Radix Tree (Patricia Trie)

A radix tree is a space-optimized trie that merges every chain of single-child nodes into one edge labeled with a string, so lookups run in O(k) on th

Data Structures

The Reorder Buffer · In-Order Retirement After Out-of-Order Execution

The reorder buffer (ROB) is a circular FIFO that lets a CPU execute out of order but retire results in program order, enabling precise exceptions and

Computer Architecture

The Sieve of Eratosthenes · Don't test for primes — cross out everything that isn't one

The Sieve of Eratosthenes finds every prime up to N by repeatedly crossing out the multiples of each prime it discovers, running in O(n log log n) tim

Algorithms

The Simplex Algorithm · The corner-hopping engine behind 70 years of linear programming

The simplex algorithm solves a linear program by walking from vertex to vertex along the edges of the feasible polytope, pivoting toward better object

Algorithms

The TLS Handshake · How a browser and server agree on keys and verify identity before any encrypted byte flows

The TLS handshake is the negotiation a browser and server run before any encrypted byte flows: they pick a cipher, exchange an ephemeral Diffie-Hellma

Networking

The Thundering Herd Problem

The thundering herd problem is when many blocked processes or threads all wake on a single event but only one can make progress, wasting the rest. Lea

Systems

The Translation Lookaside Buffer (TLB) · The 64-entry cache that stands between every memory access and a 4-level page walk

The translation lookaside buffer (TLB) is a small, fast cache of recent virtual-to-physical page translations that lets the CPU skip a multi-level pag

Computer Architecture

The Vanishing Gradient Problem · Why the deeper you stack a network, the less its first layers learn

The vanishing gradient problem is when backpropagated gradients shrink exponentially layer by layer, so early layers of a deep network barely update —

Machine Learning

The Viterbi Algorithm · The one path through the maze that the noise was hiding

The Viterbi algorithm is a dynamic-programming method that finds the single most likely sequence of hidden states in a hidden Markov model, running in

Algorithms

The WireGuard Protocol · A whole VPN in 4,000 lines — one cipher suite, no knobs to get wrong

WireGuard is a lean, fast VPN protocol — about 4,000 lines of kernel code — built on a fixed modern crypto suite (Curve25519, ChaCha20-Poly1305, BLAKE

Networking

The Y Combinator · How a function calls itself when it has no name to call

The Y combinator is a fixed-point combinator from lambda calculus that lets an anonymous function recurse without ever referring to itself by name, sa

Theory

The vDSO · Fast System Calls Without Entering the Kernel

The vDSO explained: how Linux maps a shared library into every process to serve gettimeofday and clock_gettime in nanoseconds without a kernel mode sw

Operating Systems

Thread Pool · Fixed workers, shared queue, no per-task spawn cost

A thread pool keeps a fixed set of worker threads alive and feeds them tasks from a shared queue. Avoids ~1 ms per-thread creation cost. Pool size = c

Concurrency Patterns

Three-Phase Commit · An extra round trip to make sure a dead coordinator can't freeze the whole cluster

Three-phase commit (3PC) adds a pre-commit phase between the vote and the commit of two-phase commit, so a coordinator crash leaves a timeout-recovera

Distributed Systems

Ticket Lock · FIFO Fairness with Two Counters

Ticket lock explained: a FIFO-fair spinlock using two counters (next_ticket and now_serving) and one atomic fetch-and-add. Algorithm, complexity, pitf

Concurrency

Timsort · Run Detection and Galloping Merge

Timsort explained: run detection, minrun, the merge-stack invariants, and galloping merge. Complexity, worked trace, real-system use, and how it beats

Algorithms

Token Bucket Rate Limit · Tokens refill at rate r — each request takes one — allow bursts up to capacity b

Token bucket fills with tokens at rate r up to capacity b. Each request consumes one token; empty bucket → reject. Allows bursts up to b, sustains ave

Distributed Patterns

Tomasulo's Algorithm · Dynamic Scheduling with Reservation Stations

Tomasulo's Algorithm explained: dynamic out-of-order scheduling using reservation stations, register renaming, and the Common Data Bus. Mechanism, com

Computer Architecture

Topological Sort · DAG Ordering

Order a directed acyclic graph so every edge points forward. Pick zero-indegree nodes, remove their edges, repeat. Detects cycles. Used in build syste

Algorithms

Tortoise and Hare (Floyd's Cycle Detection) · Two pointers, one fast and one slow — detect cycles with O(1) extra space

Floyd's tortoise-and-hare algorithm detects cycles in a sequence using two pointers — one moving 1 step at a time (tortoise), the other moving 2 steps

Algorithms

Transaction Isolation Levels

Transaction isolation levels define which concurrency anomalies — dirty reads, non-repeatable reads, phantoms, write skew — a database is allowed to e

Databases

Transfer Learning · Don't train from scratch — borrow a model that already learned the hard part

Transfer learning reuses a model pretrained on a giant dataset and adapts it to a new, smaller task by freezing the learned feature layers and retrain

Machine Learning

Transformer Architecture · The stacked block — attention, feed-forward, residual, layer norm — that scaled into every modern LLM

The transformer architecture is the encoder-decoder neural network that powers modern LLMs: stacked blocks of multi-head self-attention and feed-forwa

Machine Learning

Transformer Attention · Compute Q·Kᵀ/√d, softmax, multiply by V — every token attends to every other in parallel

Self-attention is the operation that powers transformers — including GPT, BERT, Llama, Claude — and replaced recurrent networks for langua

Machine Learning

Transparent Huge Pages · One TLB entry that maps 512 pages — automatically, with real tradeoffs

Transparent Huge Pages (THP) is a Linux memory feature that automatically backs process memory with 2MB pages instead of 4KB, shrinking page-table wal

Systems

Treap · BST by key + heap by random priority — randomization keeps it balanced

A treap is a binary search tree where each node has both a key (BST-ordered) and a randomly assigned priority (heap-ordered). The combined invariant g

Data Structures

Tri-Color Marking · Three colors that let a garbage collector trace the heap without stopping your program

Tri-color marking is a garbage-collection technique that partitions the heap into white, gray, and black objects so a collector can trace live data co

Systems

Trie · Prefix Tree

A tree that indexes strings by their shared prefixes. Insert and lookup time depend only on word length, not dictionary size. Powers autocomplete, spe

Data Structures

Triplet Loss · Anchor-Positive-Negative Margin Learning for Embedding Spaces

Triplet loss explained: how anchor-positive-negative margin learning shapes embedding spaces, its formula, complexity, hard/semi-hard mining, and wher

Machine Learning

Turing Machine · Abstract Computer Model

A tape, a head, a state, a transition table. Alan Turing's 1936 model captures everything a computer can compute — and proves there are problems none

Theory

Two Pointers · Meet in the Middle

Two indices move through a sorted array toward each other based on the current pair's relation to a target. Linear time for problems that look quadrat

Techniques

Two-Phase Commit (2PC) · A coordinator polls participants in a vote phase, then commits or aborts in unison

Two-phase commit (2PC) is a distributed consensus protocol that achieves atomic commit across multiple participants — either all of them commit or all

Distributed Systems

Two-Phase Locking · Grab every lock before you let one go — the rule that makes transactions serializable

Two-phase locking (2PL) is a concurrency-control protocol that guarantees serializable transactions by splitting every transaction into a growing phas

Databases

UDP — User Datagram Protocol · Fire-and-forget packets in 8 bytes of header

UDP is a connectionless transport protocol that sends best-effort datagrams with an 8-byte header and no handshake. It powers DNS, video, gaming, and

Networking

UMAP · Squash a million dimensions onto a page — and keep the neighborhoods intact

UMAP projects high-dimensional data to 2D or 3D by building a fuzzy topological graph of each point's nearest neighbors and then laying that graph out

Machine Learning

UTF-8 Encoding · Variable-length Unicode in 1 to 4 bytes — self-synchronizing, ASCII-compatible, the web's default

UTF-8 encodes any Unicode character in 1 to 4 bytes — ASCII is unchanged (1 byte), Latin and Greek take 2, most CJK takes 3, emoji and rare scripts ta

Encoding Standards

Union-Find · Disjoint Sets with Path Compression

Tracks groupings via an up-tree forest. Union merges sets; find returns the root. With path compression and union-by-rank, both are almost O(1) amorti

Data Structures

Unix Signals

Unix signals are asynchronous software interrupts the kernel delivers to a process to notify it of an event — SIGINT, SIGTERM, SIGKILL, SIGSEGV. Learn

Operating Systems

Van Emde Boas Tree · Recursively halve the universe at √U — predecessor and successor in O(log log U)

A van Emde Boas (vEB) tree is a tree-based data structure that stores n integers from a universe of size U and supports membership, insert, delete, pr

Data Structures

Variational Autoencoder (VAE) · The autoencoder that learns a latent space you can sample from

A variational autoencoder (VAE) is a generative neural network that encodes data into a probability distribution over a continuous latent space, then

Machine Learning

Vector Clocks · An array of counters that knows what happened before what

Vector clocks are per-process counter arrays that capture happens-before relationships in a distributed system. They tell you which events causally pr

Distributed Systems

Vector Search (HNSW) · A graph of shortcuts that finds your nearest neighbor in a million-vector haystack

HNSW (Hierarchical Navigable Small World) is a graph index for approximate nearest-neighbor search over embeddings, layering long-range shortcuts abov

Data Structures

Viewstamped Replication · Consensus Through View Changes

Viewstamped Replication explained: how VR achieves crash-fault-tolerant consensus through views and view changes, its algorithm, complexity, and how i

Distributed Systems

Virtual Memory · Paging & Address Translation

Each process sees its own vast address space. A page table maps virtual pages to physical frames — or to disk when memory is tight. TLB caches the hot

Systems

Vision Transformers (ViT) · Chop an image into patches, call them words, and let attention do the rest

A Vision Transformer (ViT) splits an image into fixed-size patches, linearly embeds each patch as a token, and feeds the sequence through a standard T

Machine Learning

Voronoi Diagram (Fortune's Algorithm) · Sweep a line down the plane and let parabolas carve the map

Fortune's algorithm builds a Voronoi diagram in O(n log n) by sweeping a line down the plane and tracking a beach line of parabolic arcs, processing s

Computational Geometry

Wavelet Tree · Recursively partition the alphabet — rank/select/quantile in O(log σ)

A wavelet tree is a succinct data structure for sequences over an alphabet of size σ, supporting rank, select, and access queries in O(log σ) time usi

Data Structures

WebAuthn & Passkeys · Login with a key your phone will never hand over

WebAuthn and passkeys replace passwords with a public-key credential bound to your device and unlocked by a biometric: the private key never leaves th

Security

WebRTC & NAT Traversal · How two browsers behind two routers find each other — and talk directly

WebRTC lets two browsers exchange audio, video, and data peer-to-peer with no media server, using ICE to test candidate paths, STUN to discover public

Networking

WebSocket · Bidirectional Persistent Connection

Upgrade an HTTP connection into a full-duplex channel. Server can push anytime, client can send anytime. Chat, multiplayer games, live dashboards, col

Web

WebSockets · One handshake, then a two-way pipe that never hangs up

WebSockets upgrade a single HTTP connection into a persistent, full-duplex channel: after one Upgrade handshake, client and server exchange framed mes

Networking

Weight Initialization (Xavier & He) · The two numbers that decide whether a deep net trains at all

Weight initialization sets a neural network's starting weights so signal variance stays roughly 1 as it flows through layers; Xavier scales by 1/fan_i

Machine Learning

Word Embeddings (word2vec) · Where meaning becomes geometry — and arithmetic on words actually works

Word embeddings map every word to a dense vector — typically 100 to 300 dimensions — so that words with similar meanings sit close together, and the g

Machine Learning

Work Stealing · Idle workers reach into busy workers' queues

Work stealing is a scheduler discipline where idle workers steal tasks from busy workers' deques. Provably near-optimal load balance. Used in Cilk, Go

Scheduling

Write-Ahead Log (WAL) · Log first, mutate later, recover always

A write-ahead log records every change a database is about to make to durable storage before that change is applied to data files. It's the mechanism

Databases

Write-Ahead Logging (WAL) · Log the change before you touch the data — so a crash is always replayable

Write-ahead logging (WAL) is a durability protocol that forces a log record describing a change to durable storage before the changed data page is wri

Databases

Write-Combining · Coalesce many stores into one 64-byte bus burst

Write-combining buffers coalesce multiple CPU stores to the same cache line into one transaction. The user-visible WC memory type accelerates GPU and

Memory Architecture

Yao's Garbled Circuits · Computing on Data Neither Party Sees

Yao's garbled circuits explained: how two parties compute a function on private inputs without revealing them. Protocol steps, complexity, free-XOR an

Cryptography

Z-Algorithm · Compute Z[i] = longest substring at i matching a prefix — O(n+m) pattern search

The Z-algorithm computes the Z-array Z[i] of a string s — defined as the length of the longest substring starting at position i that matches a prefix

String Algorithms

Z-Buffer (Depth Buffer) · One depth value per pixel — and the nearest surface always wins

A z-buffer is a per-pixel depth array that solves hidden-surface removal: as each triangle is rasterized, a fragment is drawn only if its depth beats

Computer Graphics

Zero-Copy I/O · Two CPU copies you can stop paying for

Zero-copy I/O moves bytes between file descriptors without copying them through user-space buffers. Calls like sendfile, splice and io_uring cut the f

Systems

Zero-Knowledge Proofs · Convince a verifier you know a secret without leaking any information

A zero-knowledge proof (ZKP) is a cryptographic protocol where a prover convinces a verifier that a statement is true without revealing any informatio

Cryptography

Zone Allocator · Partition physical memory by purpose — DMA, normal, movable — then allocate from the right pool

A zone allocator partitions physical memory into fixed-purpose ranges — DMA-reachable, normal, and high — each holding its own free-page lists. Linux'

Memory Allocation

eBPF · A safe little VM living inside Linux

eBPF is a sandboxed bytecode VM inside the Linux kernel. Programs are statically verified, JIT-compiled, and attached to syscall, packet, or scheduler

Kernel

epoll · O(1) event notification for tens of thousands of sockets — the engine behind nginx

epoll is the Linux-specific scalable event notification mechanism — replacing the classical select/poll (O(n) per call) with O(1) per-event delivery.

Operating Systems

gRPC & Protocol Buffers · A contract-first binary RPC framework — function calls that cross the network

gRPC is a binary remote-procedure-call framework that runs over HTTP/2 and serializes messages with Protocol Buffers — a schema-defined, length-prefix

Networking

io_uring · Two ring buffers, zero syscalls per operation, one million IOPS

io_uring is Linux's modern async I/O API (2019, kernel 5.1+). Shared submission and completion rings between userspace and kernel eliminate per-syscal

Operating Systems

k-d Tree · Binary tree partition of k-dimensional space

A k-d tree is a binary tree that partitions k-dimensional space by alternating axes at each level — split on x at the root, y at depth 1, z at depth 2

Data Structures

seccomp Sandboxing · Shrink the kernel's attack surface to a syscall allow-list

seccomp is a Linux kernel feature that confines a process to a whitelist of system calls, so a compromised program can't open files, spawn shells, or

Systems

t-SNE · Turn distances into probabilities — and watch the clusters fall out

t-SNE embeds high-dimensional data into 2D or 3D by turning pairwise distances into neighbor probabilities and minimizing the KL divergence between th

Machine Learning

zk-SNARKs · Prove you ran the computation — without revealing a single bit of the secret

A zk-SNARK lets you prove you ran a computation on a secret input — and got a claimed output — in a constant-size proof (≈200 bytes for Groth16) that

Cryptography