Currently, we have visualizations for the following data structures, algorithms and systems:
Also: Developer Tools — Base64, JSON viewer, URL encode, JWT decoder, hash, UUID, Unix timestamp, cron and more, all running in your browser.
Recently added
Algorithms & Data Structures
Basics
Recursion
Indexing
Sorting
Heaps
Graphs
Dynamic Programming
Strings & Greedy
Geometry
Mathematics
Number Theory
Algebra & Functions
Trigonometry & Geometry
Quadric Surfaces
Linear Algebra & Complex Numbers
Calculus
Fractals
Physics & Circuits
Probability & Statistics
Logic, Sets & Counting
Systems
Databases
PostgreSQL Internals
MySQL Internals
Distributed Systems
Software Design
Networking
Web & Security
Servers & Event Loops
Operating Systems
Concurrency
Computer Architecture
Java & the JVM
Machine Learning
AI: Search & Reasoning
Algorithms & Data Structures
Basics
- Big-O Growth Race (O(1), log n, n, n log n, n², 2ⁿ: operation counts, doubling n, time at 10⁸ ops/s, constants)
- Stack: Array Implementation
- Stack: Linked List Implementation
- Queues: Array Implementation
- Queues: Linked List Implementation
- Disjoint Sets
- Lists: Array Implementation (available in java version)
- Lists: Linked List Implementation (available in java version)
Recursion
Indexing
- Linear, Binary and Interpolation Search (of sorted list; probes, skewed data)
- Binary Search Trees
- AVL Trees (Balanced binary search trees)
- Red-Black Trees
- AVL vs Red-Black Tree (side by side)
- Splay Trees
- Skip List (express lanes, coin-flip levels, update[], search right or down, insert, delete, O(log n) expected)
- Open Hash Tables (Closed Addressing)
- Closed Hash Tables (Open Addressing)
- Closed Hash Tables, using buckets
- Separate Chaining vs Linear Probing, side by side (hash collisions, load factor, primary clustering, tombstones, resize, cache lines)
- Bloom Filter (k hashes, m bits, false positives, counting Bloom filter, LSM SSTable lookup)
- HyperLogLog (distinct counting, registers, leading zeros, Redis PFADD, PFCOUNT, PFMERGE)
- LRU Cache (Hash Map + Doubly Linked List)
- Cache Eviction: LRU vs LFU vs FIFO vs CLOCK vs OPT
- Trie (Prefix Tree, 26-ary Tree)
- Radix Tree (Compact Trie)
- Trie vs Hash Map (exact lookup, prefix search, sorted order, memory, bad hash)
- Ternary Search Tree (Trie with BST of children)
- B Trees
- B+ Trees
- B-Tree vs B+Tree (side by side)
- Quadtree vs Geohash: Restaurants Near Me (spatial index, point quadtree, radius query, pruning, geohash, base32, prefix query, 8 neighbours, border problem)
- KD-Tree vs R-Tree: Spatial Indexing (k-d tree, median split, R-tree, minimum bounding rectangle, MBR, STR packing, nearest neighbour, backtracking, MINDIST, range search, pruning)
- Fenwick Tree / Binary Indexed Tree (lowbit, i & -i, prefix sum, point update, range sum, two's complement, O(log n))
- Segment Tree (range sum query, build, point update, range add, lazy propagation, push down, O(log n))
- Reservoir Sampling (Algorithm R, stream of unknown length, k slots, keep with probability k/i, uniform sample, histogram)
- Count-Min Sketch (d hash rows, w counters, increment, query = min, overestimates, conservative update, Redis CMS)
- Segment Tree vs Fenwick Tree, side by side (binary indexed tree, BIT, range sum, prefix sum, lowbit, point update, range min, lazy propagation, memory)
- Cuckoo Hashing (two tables, two hash functions, eviction chain, cycle, rehash, O(1) worst-case lookup, load factor 50%)
- Treap (BST by key, heap by random priority, rotations, rotate-down delete, split, merge, sentinel, O(log n) expected)
Sorting
- Comparison Sorting
- Bubble, Selection, Insertion, Shell, Merge and Quick Sort
- Quick Sort vs Merge Sort (comparisons and memory, side by side)
- Heap Sort vs Quick Sort (side by side: comparisons, sorted-input worst case, cache misses, introsort)
- Sorting Race (two sorts side by side: comparisons, writes, worst cases, stability)
- Insertion vs Selection vs Bubble Sort (three simple sorts side by side: comparisons, swaps, nearly sorted, reversed, turtles)
- Bucket Sort
- Counting Sort
- Radix Sort
- Heap Sort
- TimSort (runs, run stack, galloping merges)
- External Merge Sorting Visualizer
Heap-like Data Structures
Graph Algorithms
- Breadth-First Search
- Depth-First Search
- BFS vs DFS (queue vs stack, shortest path, frontier memory, cycles)
- Connected Components
- Strongly Connected Components (Tarjan)
- Kosaraju vs Tarjan (strongly connected components, two DFS passes vs low-links, side by side)
- Euler Path and Circuit (Hierholzer's algorithm, odd-degree vertices, Königsberg bridges, stack, splicing detours)
- Dijkstra's Shortest Path
- Bellman-Ford Shortest Path (negative costs)
- A* Search (heuristic shortest path)
- Dijkstra vs A* (side by side, same graph)
- Dijkstra vs Bellman-Ford (side by side, negative edges, negative cycle, passes, edge order, early exit)
- Floyd-Warshall vs Johnson (side by side, all-pairs shortest paths, reweighting, dense vs sparse, negative cycle)
- Floyd-Warshall (all pairs shortest paths)
- Prim's Minimum Cost Spanning Tree
- Kruskal Minimum Cost Spanning Tree Algorithm
- Prim vs Kruskal (MST side by side, lazy Prim, union-find, ties, spanning forest)
- Topological Sort (Using Indegree array)
- Topological Sort (Using DFS)
- Graph Coloring (Greedy, Welsh-Powell, Backtracking)
- Maximum Flow (Ford-Fulkerson / Edmonds-Karp)
- Grid Pathfinding (A*, Dijkstra, BFS, Best-First, Bidirectional BFS, Jump Point Search, heuristics, diagonal moves, mud)
- Grid Pathfinding Side by Side (Dijkstra vs A*, BFS vs Dijkstra, Greedy, weighted A*, bidirectional, JPS racing on one map)
- Grid Replanning: A* from Scratch vs D* Lite (dynamic map, g and rhs, km, incremental search)
- Any-Angle Path Planning: A* vs Theta* (Theta*, Lazy Theta*, line of sight, post-smoothing, any-angle paths)
- Maze Generation Side by Side (recursive backtracker, Prim, Kruskal, Wilson, Aldous-Broder, Eller, binary tree, sidewinder, spanning trees)
- Path finding algorithm visualization
- Lowest Common Ancestor: Binary Lifting (up[k][v] table, 2^k-th ancestors, lift deeper node, lift both, naive walk)
- Bipartite Matching and the Hungarian Algorithm (maximum matching, augmenting path, Kuhn, Hopcroft-Karp, König's theorem, Hall's condition, vertex cover, assignment problem, cost matrix)
Dynamic Programming
- Calculating nth Fibonacci number
- Making Change
- Longest Common Subsequence
- 0/1 Knapsack
- Coin Change (Number of Ways)
- Greedy vs DP Coin Change (fewest coins, largest coin first, DP table, trace back, canonical coin systems)
- Plain Recursion vs Memoization vs Tabulation (top-down vs bottom-up DP, call tree, overlapping subproblems, cache hits, table fill order, call counts, fib(n))
- Edit Distance (Levenshtein distance, DP table, insert, delete, substitute, traceback, alignment, Wagner–Fischer)
- Matrix Chain Multiplication (best parenthesization, interval DP, cost table, split table, trace back, Catalan numbers, left to right vs best order)
- Longest Increasing Subsequence (LIS, O(n²) DP, patience sorting, binary search, lower bound, pile tops, back-pointers, O(n log n))
String & Greedy Algorithms
- Knuth-Morris-Pratt (KMP) String Matching
- String Search Race (naive vs KMP vs Boyer-Moore vs Horspool vs Rabin-Karp, side by side)
- Huffman Coding
- Base64 Encoding & Decoding (6-bit groups, padding, UTF-8, base64url)
- Rabin-Karp Rolling Hash Search (rolling hash update, spurious hits, verification, choice of modulus)
- Interval Scheduling (activity selection, earliest finish time greedy, earliest start, shortest first, counterexamples, exchange argument)
- Suffix Array (prefix doubling, Manber–Myers, LCP array, Kasai, binary search, longest repeated substring)
- Aho-Corasick Multi-Pattern Search (trie, failure links, BFS, output links, dictionary suffix links)
- LZ77 and DEFLATE (sliding window, back-references, overlapping copies, Huffman coding, gzip)
Geometric Algorithms
- 2D Rotation and Scale Matrices
- 2D Rotation and Translation Matrices
- 2D Changing Coordinate Systems
- 3D Rotation and Scale Matrices
- 3D Changing Coordinate Systems
- Fourier Series and the FFT (epicycles, Fourier coefficients, Gibbs phenomenon, DFT, Cooley–Tukey FFT, butterfly, bit reversal, twiddle factors, spectral leakage)
- Convex Hull: Graham Scan vs Gift Wrapping (convex hull, Graham scan, Jarvis march, gift wrapping, cross product, orientation test, O(n log n) vs O(nh))
- Bézier Curves (de Casteljau, lerp, Bernstein polynomials, convex hull, curve splitting)
- JPEG Compression: DCT and Quantization (8×8 block, discrete cosine transform, DC and AC coefficients, quantization table, quality factor, zigzag, run-length, EOB, Huffman, ringing, blocking)
- Rasterization: Edge Functions and the Z-Buffer (triangle rasterization, edge function, bounding box, barycentric weights, depth interpolation, z-buffer, depth test, painter's algorithm, top-left rule)
- Ray Tracing vs Rasterization (ray per pixel, ray-sphere intersection, discriminant, nearest hit, shadow ray, Lambert shading, reflection bounce, z-buffer)
Mathematics
Number Theory
- Number Bases and Two's Complement (binary, hex, repeated division, place values, byte, nibble, MSB, LSB, KiB vs kB, invert and add 1, overflow)
- Euclidean Algorithm (GCD, extended Euclid, Bézout coefficients, modular inverse, Fibonacci worst case)
- Sieve of Eratosthenes (primes, multiples, p squared, square root of n, trial division)
- The Ulam Spiral: Primes on Diagonals (square spiral, prime streaks, quadratic polynomials, Euler n² + n + 41, Hardy–Littlewood conjecture F, Sacks spiral)
- Modular Exponentiation and Toy RSA (clock arithmetic, mod n, square-and-multiply, binary exponentiation, RSA keygen, encrypt, decrypt)
- The Times-Table Circle: i → k·i mod N (modular multiplication, chords, envelope, cardioid, nephroid, epicycloid, k − 1 cusps, k mod N, Mathologer)
- The Sunflower Spiral: Vogel's Model and the Golden Angle (phyllotaxis, seed n at angle n·α, radius c·√n, golden angle 137.508°, rational spokes, continued fractions, Fibonacci spirals, parastichies)
- Extended Euclid, Modular Inverse and Toy RSA (extended Euclidean algorithm, Bézout coefficients, modular inverse, e⁻¹ mod φ(n), RSA private key, square-and-multiply, encrypt, decrypt)
- Prime Factorization (factor tree, unique factorization, GCD, LCM, number of divisors)
- Chinese Remainder Theorem (remainder grid, sieve, construction with inverses, Sunzi's problem, coprime moduli)
- The Collatz Conjecture: 3n + 1 Hailstones and the Collatz Seaweed (hailstone sequence, stopping time, 27 and 9232, reverse tree, Harriss seaweed, unproven, 2⁶⁸)
- Hamming Code (Hamming(7,4), parity bits, syndrome, single-bit error correction, SECDED, ECC memory)
- Reed-Solomon Erasure Coding (erasure code, data and parity shards, polynomial points, Lagrange interpolation, finite field GF(11), modular inverse, RAID-6, HDFS, S3, QR codes, any k of n)
Algebra & Functions
- Function Transformations (shift, stretch, reflect, y = a·f(b(x − h)) + k, order of operations)
- Quadratic Equations (completing the square, area model, vertex form, quadratic formula, discriminant, complex roots, factoring)
- What a, b and c Do to a Parabola (quadratic coefficients, y-intercept, opens up or down, width, slope at the y-intercept, vertex path, discriminant)
- Polynomial Division (long division, synthetic division, remainder theorem, factor theorem, Horner's rule)
- Cubic Functions: What a, b, c, d Do (end behaviour, y-intercept, slope at x = 0, inflection point, turning points, b² − 3ac, discriminant, Vieta, point symmetry)
- Types of Asymptotes (vertical, horizontal, slant, oblique, curvilinear, hole, degree rule, long division)
- Rational Functions: What a, b, c, e, f Do (y = (ax² + bx + c)/(ex + f), vertical asymptote x = −f/e, slant asymptote, long division, remainder, turning points, hole, point symmetry)
- Exponentials and Logarithms (compound interest, e, doubling, half-life, inverse function, slide rule, log scale)
- Exponential Graphs: What a, b, h, k Do (y = a·b^(x − h) + k, growth, decay, horizontal asymptote, growth factor, doubling time, half-life, reflection, shift equals stretch, base e)
- Damped Oscillation: What A, γ, ω, φ Do (envelope, decay rate, time constant, half-life, period, peak ratio, underdamped spring)
- The Heart Curve: a Sine Wave Filling a Heart (∛(x²) + √(3 − x²)·sin(mπx), m from 0 to 20, envelope, frequency, m·√3 waves, touch points, cusp)
- A Wave in Any Envelope: h(x) + g(x)·sin(mx) (midline, envelope, nodes, beats, wave packet)
- Driven Oscillator: Resonance, Phase Lag and Q (forced oscillation, damped driven harmonic oscillator, resonance curve, amplitude A(ω), phase lag δ, Q factor, half-power width 2γ, transient and steady state, beats, phasors)
- Spring Oscillator: What m, k, A, ω, f, T Do (mass–spring, Hooke's law, simple harmonic motion, ω = √(k/m), frequency, period, isochronism, phase, energy ½kA²)
- Simple Pendulum: What L, g, m, θ₀ and T, f, ω Do (period, frequency, angular frequency, T = 2π√(L/g), mass cancels, seconds pendulum, Moon gravity, large-angle period)
- Elastic and Inelastic Collisions: What m₁, m₂, v₁, v₂, e Do (conservation of momentum, kinetic energy, elastic collision, inelastic collision, coefficient of restitution, equal masses swap velocities, Newton's cradle, centre of mass, x–t diagram)
- Collisions in 2-D: What m₁, m₂, v₁, b, e Do (glancing collision, impact parameter, line of centres, impulse, momentum vector, head to tail, equal masses at 90°, coefficient of restitution, billiards)
- Ballistic Pendulum: What m, M, v, L Do (perfectly inelastic collision, conservation of momentum, kinetic energy lost, conservation of energy, h = V²/2g, swing angle, measuring bullet speed, Robins 1742)
- Projectile Motion: What v₀, θ, g and h Do (projectile, parabola, horizontal and vertical components, vx = v₀cos θ, vy = v₀sin θ − gt, time of flight, peak height, range R = v₀²sin 2θ/g, 45° maximum range, complementary angles, Moon gravity, horizontal launch from a cliff)
- A Block on a Ramp: What θ, m, μs, μk Do (inclined plane, friction, static friction, kinetic friction, normal force, free-body diagram, slip angle tanθ = μs, a = g(sinθ − μk·cosθ), mass cancels, x = ½at²)
- Orbital Motion: Circles, Ellipses, Escape and Kepler's Laws (circular orbit, orbital speed v_c = √(GM/r), centripetal force, gravity, escape velocity, ellipse, parabola, hyperbola, orbital energy, angular momentum, eccentricity, Kepler's second law, equal areas, Kepler's third law, period T² ∝ a³, Kepler's equation)
- RC Circuit: Charging and Discharging a Capacitor (time constant τ = RC, 63% at 1τ, exponential charge and decay, current, half-life RC·ln 2, Q = CV₀, energy ½CV₀², heat in the resistor)
- Lens Ray Diagrams: Where the Image Forms (thin lens, converging lens, diverging lens, focal length, focal point, principal rays, ray diagram, thin lens equation, magnification, real image, virtual image, upright, inverted, camera, projector, magnifying glass)
Trigonometry & Geometry
- The Pythagorean Theorem (a² + b² = c², rearrangement proof, similar triangles, distance formula, Pythagorean triples, law of cosines)
- Proofs Without Words (identities and inequalities as areas, (a + b)², a² − b², sum of odd numbers, triangular numbers, AM-GM, HM ≤ GM ≤ AM ≤ QM, sin x < x < tan x)
- Circle Theorems (inscribed angle, central angle, angles on the same arc, angle in a semicircle, Thales' theorem, cyclic quadrilateral, tangent ⟂ radius, tangent–chord angle)
- Triangle Centres (centroid, circumcentre, incentre, orthocentre, medians, perpendicular bisectors, angle bisectors, altitudes, Euler line, circumscribed and inscribed circle)
- Euler's Formula V − E + F = 2 (planar graphs, faces, outer face, Platonic solids, Schlegel diagrams, why only five, E ≤ 3V − 6, K5, K3,3)
- The Unit Circle: sin, cos, tan (unit circle, sine, cosine, tangent, radians, special angles, sin² + cos² = 1, period, phase)
- Sine Waves: What a, b, c, d Do (y = a·sin(bx + c) + d, sine, amplitude, period 2π/|b|, phase shift −c/b, midline, odd function, sin(x + π/2) = cos x)
- Cosine Waves: What a, b, c, d Do (y = a·cos(bx + c) + d, cosine, amplitude, period 2π/|b|, phase shift −c/b, midline, even function, cos(x − π/2) = sin x)
- Wave Interference: Two Coherent Sources (superposition of waves, constructive and destructive interference, interference pattern, interference fringes, central maximum, maximum and minimum intensity, node, antinode, coherent sources, phase difference, path difference, wavelength, frequency, amplitude, intensity)
- Standing Waves on a String: What n, L, T, μ Do (standing wave, guitar string, superposition of travelling waves, node, antinode, harmonic, fundamental, overtone, wave speed v = √(T/μ), tension, linear density, λ = 2L/n, f = n·v/2L, fret, octave)
- Transverse and Longitudinal Waves: a Rope, Sound and Water (transverse wave, longitudinal wave, sound wave, compression, rarefaction, displacement vs pressure, v = fλ, speed of sound 343 m/s, water waves, particle motion)
- Group Velocity and Phase Velocity: Beats, Wave Packets, Dispersion (beats, carrier and envelope, phase velocity ω/k, group velocity dω/dk, dispersion relation, deep-water waves, ripples, wave packet spreading, x–t diagram)
- The Doppler Effect: Why a Passing Siren Changes Pitch (Doppler shift, wavefronts, moving source, moving listener, observed frequency, speed of sound, sonic boom, shock wave, Mach number, Mach cone, red shift)
- Tangent Graphs: What a, b, c, d Do (period π/|b|, vertical asymptotes, phase shift, −cot, odd function)
- Polar Coordinates (r and θ, x = r cos θ, atan2, spiral, cardioid, rose curves, negative r)
- The Rose Curve r = cos kθ: Petals as k Goes from 0 to 10 (odd k → k petals, even k → 2k, k = p/q closes at qπ or 2qπ, irrational k never closes, polar pen trace)
- The Lemniscate of Bernoulli (r² = 2a²·cos 2θ, foci, Cassini ovals)
- The Maurer Rose: Straight Lines Across a Rose (r = sin(nθ), jumps of d degrees, gcd(360, d), polar coordinates, string art, n = 6 d = 71)
- Lissajous Figures: Two Sine Waves Drive One Pen (x = sin(a·t + δ), y = sin(b·t), oscilloscope XY mode, frequency ratio, phase, figure eight, parabola, closed curve, ABC logo)
- Harmonograph: a Pen Driven by Damped Pendulums (damped sine waves, Lissajous figure, spiral inward, detuning, phase drift, beats, half-life, lateral and rotary harmonograph)
- Spirograph: Hypotrochoids and Epitrochoids (rolling circle, gcd, closing after r/gcd turns, R/gcd points, hypocycloid, epicycloid, cusps, deltoid, astroid, cardioid, nephroid, coin rotation paradox)
- The Butterfly Curve: Six Laps of a Polar Pen (r = e^cos t − 2cos 4t − sin⁵(t/12), Temple Fay, laps of 2π, negative r, period 24π)
- The Superformula: Gielis Shapes from Four Numbers (r(φ) = (|cos(mφ/4)|^n₂ + |sin(mφ/4)|^n₃)^(−1/n₁), m-fold symmetry, n₁ spiky vs round, n₂ and n₃ shape the sides, Lamé curve, superellipse, closing after 4π)
- Ellipse: What a, b, h, k Do (ellipse, standard form, semi-major axis, semi-minor axis, centre, foci, c² = a² − b², eccentricity, vertices, circle, focal sum, general form)
- Parabola: Focus, Directrix and What p, h, k Do (conic section, (x − h)² = 4p(y − k), focus, directrix, focal length, latus rectum, eccentricity 1, sideways parabola, a = 1/(4p), reflection property)
- Hyperbola: What h, k, a, b Do (vertices, asymptotes, foci, c² = a² + b², eccentricity, conjugate hyperbola)
- Conic Sections: What A, B, C, D, E, F Do (general conic, B² − 4AC, rotation of axes, completing the square, degenerate conics, determinant)
- Conics by Eccentricity: r = ep/(1 + e cos θ) (eccentricity, focus, directrix, |PF| = e·|PD|, semi-latus rectum, polar form, orbits, Halley's comet)
Quadric Surfaces
- Quadric Surfaces (ellipsoid, hyperboloid of one sheet, two sheets, elliptic paraboloid, saddle, cone, cylinder, plane, traces z = h, general form)
- Ellipsoid (semi-axes, sphere, prolate and oblate spheroid, cuts, volume 4/3πabc)
- Hyperboloid of One Sheet (waist, cuts x = h and z = h, asymptotic cone, rulings, cooling towers)
- Hyperboloid of Two Sheets (vertices, gap, traces, asymptotic cone, a, b, c)
- Elliptic Paraboloid (z = x²/a² + y²/b², vertex, elliptic cuts a√h by b√h, parabolic cuts, circular paraboloid, focus a²/4, reflection property)
- Hyperbolic Paraboloid (saddle, saddle point, cuts z = h, x = h, y = h, hyperbola, parabola, doubly ruled, straight lines, z = xy)
- Elliptic Cone (apex, generating lines, conic sections, ellipse, parabola, hyperbola, degenerate conics)
- Elliptic Cylinder (x²/a² + y²/b² = 1, rulings, cut z = h, cut x = h, tangent plane, circular cylinder, tilted cut)
- Hyperbolic Cylinder (two walls, rulings, asymptotic planes, cuts x = h / y = h / z = h)
- Plane Equation (normal vector, distance from the origin, intercepts, intercept form, traces, vertical and horizontal planes)
- Surfaces of Revolution (spin a curve, x² → x² + y², cone, cylinder, paraboloid, sphere, spheroid, hyperboloids, torus)
- Quadric Classification (general to standard form, symmetric matrix, eigenvalues, principal axes, rotation, completing the square, signs table)
- Surfaces by Degree: Planes, Quadrics, Cubics, Quartics (algebraic surface, degree, cubic surface, quartic surface, line meets in n points, nodes, Cayley cubic, Kummer surface, torus)
- Monkey Saddle (cubic surface, three hills and valleys, r³ cos 3θ, degenerate critical point)
- Cubic Surface x³ + y³ + z² = 1 (cubic cuts, Fermat cubic, asymptote x + y = 0, straight lines, singular point, unbounded, squares vs cubes)
- Cayley's Nodal Cubic (four nodes, double cone, six lines, conic cuts z = h, smooth vs nodal, x³ + y³ + z³ − 3xyz = plane + line)
- Quartic Surface x⁴ + y⁴ − z⁴ = 1 (squircle, superellipse, cuts z = h and x = h, straight lines, cone x⁴ + y⁴ = z⁴, exponent p, hyperboloid)
- Kummer Surface (quartic, 16 nodes, double points, tetrahedron, μ² and λ, cuts z = h, quartic curves)
Linear Algebra & Complex Numbers
- 2D Vectors and the Dot Product (vector addition, scaling, dot product, cosine similarity, projection, cross product, parallelogram area)
- Determinant: how a 2×2 matrix scales area (ad − bc, area scaling, shear, reflection, orientation, singular matrix, det(AB) = det A · det B)
- Gaussian Elimination (augmented matrix, row operations, pivots, row-echelon form, back substitution, row swap, no solution, infinitely many solutions)
- Eigenvectors & Eigenvalues (characteristic equation, det(A − λI) = 0, symmetric, rotation, shear, power iteration, Rayleigh quotient)
- Complex Numbers (complex plane, vector addition, multiplication as rotation, i² = −1, polar form, Euler's formula, roots of unity)
- Matrix Multiplication (row times column, shape rule m×n · n×p, n³ cost, composition, AB ≠ BA, identity and inverse)
- Linear Transformations (basis vectors, matrix times vector, change of basis, inverse, singular, null space)
- Rotation Matrix (R(θ), cos θ, sin θ, unit circle, Rᵀ = R⁻¹, angles add, det = 1, eigenvalues e^(±iθ))
- Reflection Matrix (mirror line, F(θ) = [cos 2θ sin 2θ; sin 2θ −cos 2θ], det = −1, eigenvalues ±1, F = 2P − I, two reflections = rotation)
- Scaling Matrix (stretch, uniform vs non-uniform, det = sx·sy, eigenvectors, inverse)
- Shear Matrix (shear H(k), deck of cards, det = 1, defective, inverse −k, row operation)
- Projection Matrix (orthogonal projection, P = u uᵀ, idempotent, rank 1, null space)
- Squeeze Mapping (squeeze Q(k), hyperbolas xy = c, det = 1, eigenvalues k and 1/k, hyperbolic angle, Lorentz boost)
- Composing Transforms (composition, matrix product B·A, AB ≠ BA, commuting, two reflections = rotation, det(AB), inverse in reverse order)
- Affine Transforms: Translation as a 3×3 Matrix (homogeneous coordinates, translation, T·R·T⁻¹, order of transforms, points vs vectors)
- Inverse Matrix (row reduction, [A | I], elementary matrices, shear, scaling, row swap, 2×2 formula, singular)
- Diagonalization: A = P D P⁻¹ (eigenvectors as columns of P, eigenvalues in D, matrix powers, dominant eigenvalue, Fibonacci, golden ratio, defective matrix)
- Column Space and Null Space (rank, nullity, pivots, Ax = b, rank–nullity theorem, invertible)
- Gram–Schmidt and QR (orthonormal basis, projection, A = QR, upper triangular R, QᵀQ = I, rank)
- 3D Rotation Matrix (Rx, Ry, Rz, Rodrigues' formula, axis λ = 1, Mᵀ = M⁻¹, order matters, trace = 1 + 2cos θ)
- 3D Reflection Matrix (mirror plane, Householder H = I − 2nnᵀ, det = −1, handedness, H² = I, eigenvalues 1, 1, −1, point reflection −I)
- Projection Matrix in 3D (orthogonal projection, I − nnᵀ, uuᵀ, shadow, P² = P, rank, least squares A(AᵀA)⁻¹Aᵀ)
- 3D Shear Matrix (deck of cards, fixed plane z = 0, det = 1, Cavalieri, parallelepiped, not diagonalizable, row operation)
- Quaternions (3D rotation, unit quaternion, half angle, q v q*, double cover, gimbal lock, Euler angles, slerp)
- Perspective Projection: the Pinhole Camera (pinhole camera, x' = f·x/z, vanishing point, focal length, field of view, homogeneous coordinates, divide by w, orthographic vs perspective)
- Least Squares as Projection (residuals, squared residuals, overdetermined system, column space, projection, normal equations, outlier)
- SVD and PCA in 2D (singular value decomposition, rotate stretch rotate, singular values, covariance matrix, principal components, variance explained, dimensionality reduction)
Calculus
- Limits & Continuity (ε–δ definition, one-sided limits, removable hole, jump, infinite and oscillating discontinuity, continuity test)
- Derivative as a Limit (secant slope, difference quotient, tangent, f′(x), |x| corner, floating-point cancellation)
- Local Linearity: Zoom In (tangent line, f′(x), |x| corner, linear approximation, differential dy ≈ f′(x)·dx, error ∝ dx²)
- Derivative Rules as Pictures (power rule, square and cube, product rule, sin′ = cos, 1/x, dx → 0)
- f, f′, f″: Reading Derivative Graphs (rising and falling, critical points, concavity, inflection points, position, velocity, acceleration, sketching f′)
- Critical & Singular Points (f′ = 0 or undefined, first-derivative test, ∇f = 0, second-derivative test, saddle, monkey saddle, node, cusp, isolated point)
- Mean Value Theorem (secant, parallel tangent, f′(c) = average slope, Rolle's theorem, speedometer, corner and jump counterexamples)
- Accumulation: Rate → Amount (rate × time, area under a rate graph, signed area, net change, displacement vs distance)
- Riemann Sums (definite integral, signed area, left, right, midpoint, trapezoid rule, error vs n)
- Numerical Integration: Riemann vs Trapezoid vs Simpson (left Riemann sum, trapezoid rule, Simpson's rule, error order h, h², h⁴, log-log error chart, periodic functions)
- Geometric Series (½ + ¼ + … = 1, partial sums, ratio r, a/(1 − r), Zeno's paradox, convergence and divergence, harmonic series)
- Taylor Series (Maclaurin polynomial, derivatives, k!, error, radius of convergence, computing e)
- Fourier Series, Harmonic by Harmonic (Fourier coefficients, orthogonality, aₙ and bₙ, epicycles, partial sums, Gibbs phenomenon, Parseval, RMS error, square, sawtooth, triangle wave)
- Fourier Epicycles: Drawing a Shape with Spinning Circles (epicycles, DFT, complex Fourier series, sorted coefficients, Parseval, inverse DFT, ringing at corners)
- The Weierstrass Function: Continuous Everywhere, Differentiable Nowhere (Σ aⁿ cos(bⁿπx), Weierstrass M-test, uniform convergence, nowhere differentiable, secant slope, self-similarity, zoom, fractal, box dimension)
- Newton's Method (root finding, tangent line, quadratic convergence, bisection, Babylonian square root)
- Root Finding: Bisection vs Newton vs Secant (order of convergence, function evaluations, divergence, double root)
- The Chain Rule (rates multiply, gears, computation graph, forward and backward pass, product rule, gradient check)
- Fundamental Theorem of Calculus (area function, A′(x) = f(x), antiderivative, F(b) − F(a), signed area)
- Integration by Parts and Substitution (∫u dv = uv − ∫v du, u-substitution, du = g′(x)dx, change of variables, LIATE)
- Volumes by Slicing (solid of revolution, disk method, shell method, cone, sphere, paraboloid)
- Improper Integrals (∫ to ∞, p-test, infinite height, Gabriel's horn)
- Six Types of Integrals (single variable, line integral, Lebesgue integral, double integral, flux integral, triple integral, cut multiply add, measure μ)
- Euler's Method (differential equations, slope field, step size h, first-order error, stability, logistic growth, Heun's method)
- Runge–Kutta vs Euler (RK4, midpoint RK2, k₁…k₄ stages, order h⁴, error vs step size, slope evaluations, phase plane, energy drift)
- The Logistic Map: from a Fixed Point to Chaos (cobweb plot, period doubling, bifurcation diagram, Feigenbaum δ, period-3 window, sensitivity to x₀)
- The Lorenz Attractor: Deterministic Chaos (butterfly effect, strange attractor, sensitive dependence, Lyapunov exponent, fixed points C±, RK4, periodic windows)
- The Double Pendulum: Normal Modes and Chaos (RK4, θ₁ and θ₂, in-phase and anti-phase normal modes, sensitive dependence, rainbow fan-out, energy conservation)
- The Laplace Transform (F(s) = ∫ f(t)·e^(−st) dt, weighted area, region of convergence, poles, s-plane, L{y′} = sY − y(0), solving ODEs, partial fractions, cover-up rule, inverse transform)
- Level Curves and Contour Maps (level curve f(x, y) = k, contour map, steepness, saddle, marching squares)
Fractals
- The Mandelbrot Set: z → z² + c, Zooms and Orbits (escape count, main cardioid, period-2 disk, bulbs, mini copies, double precision limit)
- Julia Sets of z → z² + c (escape time, Mandelbrot map, connected vs Cantor dust, orbits)
- The Chaos Game: Random Jumps Draw the Sierpinski Triangle (dice, halfway jumps, self-similarity, fractal dimension log 3 / log 2, square and pentagon variants)
- The Barnsley Fern: Four Affine Maps Picked at Random (iterated function system, chaos game, attractor, self-similarity, probabilities, Cyclosorus)
- Fractal Curves: Koch Snowflake, Dragon Curve, Hilbert Curve (recursive curves, self-similarity, infinite perimeter, finite area, paper folding, space-filling curve, fractal dimension)
Physics & Circuits
- RLC Circuits: Charging, Ringing and Resonance (RC, RL, series and parallel RLC, time constant τ, underdamped, critically damped, overdamped, Kirchhoff's laws, impedance, phasors, resonance, Q, bandwidth)
- Ohm's Law and Kirchhoff's Laws: Solving a Resistor Network (Ohm's law, V = IR, Kirchhoff's current law, KCL, Kirchhoff's voltage law, KVL, node voltage method, nodal analysis, series and parallel resistors, conductance, open circuit)
- Diodes and Rectifiers: AC In, DC Out (diode, I-V curve, Shockley equation, 0.7 V forward drop, half-wave rectifier, full-wave bridge rectifier, smoothing capacitor, ripple, PIV)
- The Ideal Op-Amp: Two Rules, Four Circuits (operational amplifier, golden rules, virtual ground, inverting amplifier, non-inverting amplifier, voltage follower, buffer, comparator, saturation, transfer curve)
- Faraday's Law: Electromagnetic Induction and Lenz's Law (magnetic flux, induced EMF, ε = −N dΦ/dt, Lenz's law, magnet and coil, galvanometer, AC generator, Φ = BA cos θ, ε = NBAω sin θ)
- Electromagnetic Waves: E, B, c and Polarization (Maxwell, light, E ⟂ B, E₀ = cB₀, c = 1/√(μ₀ε₀), c = λf, Poynting vector E × B, intensity, spectrum, linear, circular and elliptical polarization)
- A Dipole Antenna: How Radio Waves Are Sent and Received (antenna, accelerating charges, half-wave dipole, λ/2, radiation pattern sin²θ, doughnut, polarization, receiving antenna, 1/r field, FM radio, Wi-Fi)
- Polarizers and Malus's Law: Linear, Circular and Unpolarized Light (polarizer, transmission axis, unpolarized light, Malus's law I = I₀cos²θ, crossed polarizers, three polarizers, quarter-wave plate, half-wave plate, circular polarization, Jones vector)
- Refraction: Why Light Bends, Snell's Law and Total Internal Reflection (refractive index, v = c/n, λ = λ₀/n, wavefronts, Snell's law n₁ sin θ₁ = n₂ sin θ₂, toward the normal, critical angle, total internal reflection, Fresnel reflection, optical fibre)
- Diffraction: Single Slit, Double Slit and Gratings (Huygens wavelets, single slit a·sin θ = mλ, sinc², double slit, envelope, missing orders, diffraction grating, phasor chain, spectrometer)
- The Transistor as a Switch: MOSFET, BJT, CMOS NOT and NAND (nMOS, pMOS, threshold voltage, half on, BJT cutoff / active / saturation, CMOS inverter, NAND, pull-up, pull-down, universal gate)
Probability & Statistics
- Bayes' Theorem (prior, likelihood, posterior, medical test, false positives, base-rate fallacy)
- Pascal's Triangle (binomial coefficients, C(n,k), lattice paths, binomial theorem, row sums 2^n, Galton board, binomial distribution)
- Permutations vs Combinations (P(n,k), C(n,k), order vs sets, k!, repetition, stars and bars, Pascal's rule)
- Central Limit Theorem (dice sums, normal distribution, bell curve, standard error, σ/√n)
- Monte Carlo Estimation of π (random points, quarter circle, 4·inside/n, 1/√n error, seeds, Monte Carlo integration)
- Normal Distribution, z-Scores and Confidence Intervals (bell curve, 68–95–99.7 rule, z table, percentile, standard error, 95% CI)
- Mean vs Median vs Mode (central tendency, dot plot, outlier, robust statistic, right skew, bimodal, no mode, n × mean = total)
- Markov Chains and Random Walks (transition matrix, stationary distribution, πP = π, random walk √n, gambler's ruin)
- Binomial vs Poisson (coin flips, binomial PMF, Poisson limit, λ = np, law of rare events, total variation distance, Le Cam bound)
- Hypothesis Testing with a Coin (null hypothesis, test statistic, p-value, tail area, significance level α, rejection region, type I error, type II error, power)
- Confidence Intervals (repeated samples, x̄ ± z*·σ/√n, 95% coverage, margin of error, standard error, sample size, confidence level, z*)
- The Birthday Paradox (shared birthdays, 23 people 50%, pairs n(n−1)/2, complement product, simulated rooms, √N rule, hash collisions, birthday attack)
- The Monty Hall Problem (stick vs switch, 1/3 vs 2/3, simulation, probability tree, conditional probability, host knowledge)
Logic, Sets & Counting
- Truth Tables and Sets (truth table, Venn diagram, AND intersection, OR union, NOT complement, implication, XOR, De Morgan's law)
- Inclusion–Exclusion and the Pigeonhole Principle (Venn region tallies, union of sets, 1..100 divisible by 2, 3 or 5, derangements, pigeonhole, birthday)
- Catalan Numbers (balanced parentheses, binary trees, lattice paths, Dyck paths, recurrence, reflection, triangulations)
- The Pigeonhole Principle (socks, birthdays, ⌈n/m⌉, worst case, prefix sums mod n, sums divisible by n, Erdős–Szekeres, monotone subsequence)
- Regex to NFA to DFA (Thompson's construction, NFA, ε edges, ε-closure, move, subset construction, powerset construction, DFA, dead state, (a|b)*abb)
- Karnaugh Maps (Boolean simplification, Gray code, grouping 1s, prime implicants, minimal SOP, don't cares, consensus)
Systems
Databases & Storage
- B+ Tree as a Database Index (heap file, RIDs, range scans)
- Clustered vs Secondary Index, side by side (InnoDB, primary key B+ tree, secondary index, bookmark lookup, covering index, Using index, range scan, random I/O, full scan)
- LSM Tree vs B+ Tree (write, read and space amplification)
- Row Store vs Column Store (pages read, OLTP vs OLAP, columnar, run-length encoding, tuple reconstruction)
- Snowflake vs UUIDv4 vs UUIDv7 (unique IDs, 41-bit timestamp, machine id, sequence overflow, clock moving backwards, B+ tree page splits)
- How MySQL Runs a Query (SELECT, INSERT, UPDATE, DELETE: buffer pool, undo, redo, binlog)
- How MySQL Executes JOIN, GROUP BY and ORDER BY (nested loop, hash join, temporary table, filesort)
- How PostgreSQL Runs a Query (SELECT, INSERT, UPDATE, DELETE: heap, MVCC tuples, HOT, VACUUM, WAL)
- How PostgreSQL Executes JOIN, GROUP BY and ORDER BY (Nested Loop, Hash/Merge Join, HashAggregate, Sort methods)
- How a SELECT Runs: WHERE, GROUP BY, HAVING, ORDER BY (logical order, MySQL vs PostgreSQL, SELECT aliases, aggregates in WHERE, ONLY_FULL_GROUP_BY, NULL group, NULLS FIRST/LAST, HAVING pushdown)
- How a Query Planner Picks a Plan (PostgreSQL optimizer, pg_stats, selectivity, cost model, Seq Scan, Index Scan, Bitmap Heap Scan, join order, nested loop, hash join, merge join, EXPLAIN ANALYZE, ANALYZE, CREATE STATISTICS)
- Nested Loop vs Hash Join vs Merge Join (join algorithms, work_mem, hash batches, sort-merge, index lookup)
- Database Connection Pool (HikariCP and PostgreSQL: open cost, getConnection, close, waiting, connectionTimeout, leaks, max_connections, idleTimeout)
- Connection Pool Sizing: Why a Small Pool Beats a Big One (maximumPoolSize, cores × 2 + spindles, time-slicing, context switches, contention, throughput vs latency, Little's law, max_connections)
- Connection Pool Settings in Action (HikariCP, minimumIdle, idleTimeout, connectionTimeout, maxLifetime, keepaliveTime, NAT idle timeout, leakDetectionThreshold, socketTimeout, tcp_retries2, isValid)
- The N+1 Query Problem (ORM, Hibernate, JPA, lazy loading, proxy, FetchType.EAGER, JOIN FETCH, @EntityGraph, @BatchSize, IN query, round trips, select_related, prefetch_related, DataLoader)
- How MongoDB Runs a Command (find, insertOne, updateOne, deleteOne: WiredTiger cache, update chains, journal, oplog, write concern, rollback)
- MongoDB Sharding: mongos, Chunks and the Balancer (shard key, config servers, targeted vs scatter-gather, chunk split, moveChunk, StaleConfig, hashed sharding, hot shard)
- MongoDB Replica Set Elections and Rollback (protocolVersion 1, heartbeats, electionTimeoutMillis, term, dry run, replSetRequestVotes, oplog, majority commit point, w: 1 vs w: majority, rollback file, ROLLBACK, RECOVERING, priority takeover, stepDown, network partition)
- MongoDB Read Concern and Causal Consistency (readConcern local, available, majority, linearizable, snapshot, readPreference, secondary lag, majority commit point, rolled-back read, causal session, afterClusterTime, operationTime, stale primary)
- MongoDB Multi-Document Transactions (session, lsid, txnNumber, startTransaction, readConcern snapshot, read timestamp, update chain, applyOps, WriteConflict, TransientTransactionError, withTransaction, transactionLifetimeLimitSeconds, NoSuchTransaction, sharded two-phase commit, prepareTransaction)
- MongoDB Aggregation Pipeline, Stage by Stage ($match, $group, $sort, $unwind, $lookup, $limit, IXSCAN vs COLLSCAN, pipeline optimizer, $sort + $match reorder, top-k sort, blocking stages, 100 MB stage limit, allowDiskUse, allowDiskUseByDefault, spill to _tmp, error 292)
- MongoDB Indexes: Compound, ESR, Multikey, Covered (compound index key order, prefix rule, ESR equality sort range, in-memory SORT, multikey index, dupsDropped, covered query, PROJECTION_COVERED, explain, IXSCAN, FETCH, keysExamined, docsExamined)
- MVCC and Isolation Levels (row versions, snapshots, dirty read, non-repeatable read, phantom, lost update, write skew, SSI)
- Optimistic vs Pessimistic Locking (side by side: SELECT FOR UPDATE, lock queue, lock wait timeout, deadlock, version column, retries, lost update)
- Two-Phase Locking and Deadlock Detection (strict 2PL, S/X row locks, lock table, wait queue, wait-for graph, deadlock victim, ERROR 1213, lock ordering)
- Write-Ahead Logging and ARIES Crash Recovery (WAL rules, steal / no-force, checkpoints, analysis, redo, undo, CLRs)
- SQLite Internals (one file of pages, page 1 header, table and index b-trees, page split, pager, rollback journal, SHARED/RESERVED/PENDING/EXCLUSIVE, hot journal, WAL frames, commit frame, wal-index, read marks, checkpoint, wal_autocheckpoint, SQLITE_BUSY)
- Database Normalization: 1NF, 2NF and 3NF (functional dependencies, keys, partial dependency, transitive dependency, update / insert / delete anomalies, lossless join, spurious rows)
- Inverted Index: From Documents to Posting Lists (Lucene, Elasticsearch, analyzer, tokenizer, stop words, term dictionary, posting list, document frequency, term frequency, AND intersection, OR union, TF-IDF, full-text search)
PostgreSQL Internals
- PostgreSQL Process Architecture (postmaster, fork per connection, backend, shared memory, work_mem, checkpointer, walwriter, autovacuum, crash recovery, max_connections, PgBouncer)
- PostgreSQL Shared Buffers and the Clock Sweep (shared_buffers, buffer descriptors, buffer mapping hash table, usage_count, pins, dirty write-back, bgwriter, ring buffer, BAS_BULKREAD)
- Inside a PostgreSQL Heap Page (8 KB page layout, line pointers, pd_lower, pd_upper, ctid, tuple header, HOT chain, pruning, LP_REDIRECT, fillfactor)
- How PostgreSQL Stores Big Values (TOAST) (TOAST, pglz, lz4, pg_toast chunks, TOAST pointer, storage strategies, detoasting)
- PostgreSQL Free Space Map and Visibility Map (FSM max-tree, all-visible, all-frozen, index-only scan, Heap Fetches, VACUUM)
- PostgreSQL pg_xact (CLOG) and Hint Bits (commit status, 2 bits per xid, SLRU, HEAP_XMIN_COMMITTED, first-SELECT writes, no undo)
- PostgreSQL XID Wraparound and Freezing (transaction ID, modulo 2^32, VACUUM FREEZE, relfrozenxid, datfrozenxid, age, autovacuum_freeze_max_age, anti-wraparound autovacuum)
- The PostgreSQL Lock Manager (table lock modes, conflict matrix, pg_locks, lock queue, row locks in xmax, deadlock_timeout, deadlock detection)
- Serializable Snapshot Isolation in PostgreSQL (SSI, SIREAD locks, rw-antidependency, dangerous structure, write skew, 40001, retry)
- PostgreSQL WAL Internals (WAL buffers, LSN, pd_lsn, fsync, full-page writes, group commit, commit_delay, synchronous_commit, redo-only recovery)
- PostgreSQL Checkpoints (checkpoint_timeout, max_wal_size, redo point, checkpoint_completion_target, WAL recycling, crash recovery)
- PostgreSQL Logical Decoding and Logical Replication (wal_level logical, walsender, reorder buffer, commit order, pgoutput, test_decoding, publication, subscription, replication slot, restart_lsn, confirmed_flush_lsn, max_slot_wal_keep_size)
- PostgreSQL Index Types (B-tree deduplication, posting list, Hash, GIN, pending list, GiST, bounding box, BRIN, block range)
- PostgreSQL Bitmap Index Scan and Bitmap Heap Scan (TID bitmap, BitmapAnd, BitmapOr, lossy pages, Recheck Cond, work_mem, EXPLAIN ANALYZE)
- PostgreSQL Parallel Query (Gather, Gather Merge, parallel workers, Parallel Seq Scan, Partial Aggregate, DSM)
MySQL / InnoDB Internals
- The InnoDB Buffer Pool: Midpoint LRU and Flushing (page hash, free list, young and old sublists, innodb_old_blocks_time, flush list, page cleaner, single page flush)
- Inside an InnoDB Index Page (16 KB page, clustered index, page directory, next_record, heap_no, infimum/supremum, DB_TRX_ID, DB_ROLL_PTR, bookmark lookup, AUTO_INCREMENT vs UUID, page split, purge, MERGE_THRESHOLD, page merge)
- The InnoDB Change Buffer (secondary index, ibuf bitmap, merge on read, innodb_change_buffering, unique index, redo log)
- InnoDB Adaptive Hash Index (AHI, btr_search_info, hash vs non-hash searches, B+ tree walk, AHI partitions, btr0sea latch contention)
- InnoDB Doublewrite Buffer and Torn Pages (doublewrite, torn page, 16 KB page, checksum, innodb_doublewrite, page cleaner, crash recovery)
- InnoDB Undo Logs, Read Views and Purge (undo log, DB_TRX_ID, DB_ROLL_PTR, version chain, read view, purge, history list length, delete mark)
- InnoDB Isolation: Snapshot Reads vs Current Reads (read view, m_ids, undo log, DB_ROLL_PTR, consistent read, locking read, FOR UPDATE, FOR SHARE, READ COMMITTED vs REPEATABLE READ, semi-consistent read, lost update, write skew, SERIALIZABLE, ERROR 1213)
- InnoDB Record, Gap and Next-Key Locks (gap lock, next-key lock, insert intention, record lock, data_locks, supremum, phantom, REPEATABLE READ, READ COMMITTED, deadlock, ERROR 1213)
- MySQL Metadata Locks and Online DDL (MDL, SHARED_READ, EXCLUSIVE, Waiting for table metadata lock, lock_wait_timeout, ALGORITHM=INSTANT, INPLACE, COPY, online row log)
- InnoDB Redo Log Internals (mini-transaction, LSN, log buffer, innodb_flush_log_at_trx_commit, log writer, checkpoint age, adaptive flushing)
- MySQL Binlog Group Commit (two-phase commit, Xid, binlog, FLUSH / SYNC / COMMIT stages, leader and followers, sync_binlog, binlog_group_commit_sync_delay, binlog_order_commits, crash recovery)
- InnoDB Crash Recovery (checkpoint LSN, doublewrite, redo apply, page LSN, undo rollback, PREPARED, binlog Xid, two-phase commit)
- MySQL Replication Internals (binlog, GTID, dump thread, receiver thread, relay log, parallel applier, LOGICAL_CLOCK, auto-positioning, row vs statement, Seconds_Behind_Source, semi-sync)
- MySQL Group Replication and InnoDB Cluster (write sets, certification, XCom, Paxos, ERROR 3101, single-primary, multi-primary, flow control, quorum, primary election, MySQL Router)
- MySQL Index Access Paths and EXPLAIN (covering index, leftmost prefix, skip scan, key_len, Index Condition Pushdown, Multi-Range Read, index merge, sort_union, clustered lookup)
Distributed Systems
- Primary–Replica Replication: Sync vs Async, Lag and Failover (WAL shipping, stale reads, LSN tokens, lost writes, split brain, fencing)
- Consistency Patterns: Weak, Eventual, Causal, Strong (stale reads, anti-entropy, read-your-writes, monotonic reads, causal dependencies, last write wins, linearizability)
- The CAP Theorem: CP vs AP Side by Side (network partition, linearizability, majority quorums, stale reads, last write wins, vector clocks, R + W > N, ReadIndex, PACELC)
- How Raft Elects a Leader and Replicates a Log (terms, randomized timeouts, split votes, log repair, Figure 8, minority leader, pre-vote)
- Raft vs Multi-Paxos, Side by Side (terms vs ballots, RequestVote vs Prepare, election restriction, re-proposing accepted values, split vote, duelling proposers, message counts)
- etcd: the Store Behind Kubernetes (Raft log, MVCC revision, create_revision, mod_revision, tombstone, compaction, watch, informer, lease, KeepAlive, txn compare-and-swap, resourceVersion, ReadIndex, linearizable vs serializable read)
- Paxos: How Three Acceptors Agree on One Value (single-decree Paxos, Prepare, Promise, Accept, majorities, dueling proposers, Multi-Paxos)
- Lamport Clocks and Vector Clocks (happened-before, logical clock, concurrent events, vector comparison, conflict detection, total order)
- Leader Election: Bully vs Ring (Chang–Roberts) (bully algorithm, ELECTION, OK, COORDINATOR, ring token, message count, takeover)
- Byzantine Fault Tolerance: PBFT (3f+1 replicas, pre-prepare, prepare, commit, view change, traitor, Byzantine generals)
- Gossip and SWIM: How a Cluster Knows Who Is Alive (push gossip, fanout, log N rounds, SWIM, ping-req, suspicion, incarnation number, piggyback, join)
- Chandy–Lamport Distributed Snapshot (global state, marker, channel state, consistent cut, FIFO channels, in-flight messages, multiple initiators, Flink checkpoints)
- Quorum Reads and Writes (R + W > N, N replicas, W acks, R replies, versions, stale reads, read repair, sloppy quorum, hinted handoff)
- Leader-based vs Leaderless Replication (side by side, semi-sync leader, failover pause, Dynamo-style W of N, stale reads, read repair, hinted handoff)
- CRDTs: Conflict-Free Replicated Data Types (G-Counter, PN-Counter, OR-Set, state-based merge, element-wise max, add-wins, idempotent, commutative, strong eventual consistency)
- Merkle Trees for Anti-Entropy Repair (hash tree, root compare, descend mismatching subtrees, range sync, last write wins, hashes vs full compare)
- Partitioning vs Sharding (pruning, shard keys, scatter-gather, 2PC, resharding with hash % N vs buckets)
- Consistent Hashing (hash ring, virtual nodes, binary search lookup, preference lists, hinted handoff, vs hash % N and fixed slots)
- Range vs Hash Partitioning (time-series hot spot, range scan vs scatter-gather, point lookup, range split vs hash % N rebalancing)
- MapReduce: Word Count, Shuffle and Failures (map, reduce, hash partitioning, shuffle, combiner, worker failure, re-execution, straggler, speculative backup, skewed key)
- Saga vs Two-Phase Commit (side by side: locks, blocking, compensation, isolation)
- Two-Phase Commit (coordinator, PREPARE, YES/NO votes, COMMIT/ABORT, ACK, forced log records, vote timeout, in doubt, blocking, recovery from the log, XA)
- Saga: Orchestration vs Choreography (commands vs events, saga definition, subscriptions, compensation, stalled order, adding a step)
- Transactional Outbox and Inbox (dual-write problem, polling relay, CDC, duplicates, idempotent consumer, effectively-once)
- Delivery Semantics: At-most-once vs At-least-once vs Exactly-once (acks, retries, offset commit order, duplicates, idempotent producer, dedup key)
- Event Sourcing and CQRS (event store, append-only stream, aggregate, expected version, optimistic concurrency, projector, read model, eventual consistency, replay, snapshots)
- Change Data Capture: Log Tailing from the WAL to Kafka (Debezium, replication slot, LSN, snapshot, op c/u/d, source offsets, duplicates, WAL retention, outbox event router)
- How Kafka Moves a Message (producer batching, acks, replication, ISR, consumer groups)
- Push vs Pull Messaging: RabbitMQ vs Kafka (push, pull, basic.qos prefetch_count, basic.ack, consumer buffer, OOM, requeue, offset, commit, lag, max.poll.records, long poll, replay, fanout exchange, consumer groups)
- Kafka Consumer Groups: Rebalancing, Duplicates and Exactly-Once (range vs cooperative-sticky, static membership, zombies, idempotent producer, transactions)
- Kafka Log Segments: How a Partition Is Stored on Disk (segments, .log/.index/.timeindex, segment.bytes, sparse index, offsetsForTimes, retention.ms, retention.bytes, log start offset, auto.offset.reset)
- Kafka Replication: Fetching, the ISR, Leader Epochs and Truncation (ISR, high watermark, LEO, replica.lag.time.max.ms, min.insync.replicas, OffsetsForLeaderEpoch, KIP-101, unclean leader election)
- Kafka Log Compaction (log cleaner, dirty ratio, offset map, tombstones, delete.retention.ms, min.compaction.lag.ms)
- Kafka KRaft: the Controller Quorum and the Metadata Log (__cluster_metadata, active controller, observers, BrokerHeartbeat, fencing, epoch, snapshots)
- Kafka Zero Copy (sendfile, transferTo, page cache, DMA, context switches, TLS, fsync)
- How Redis Sentinel Fails Over a Master (SDOWN, ODOWN, leader vote, replica promotion, split brain)
- How Redis Cluster Shards and Fails Over (hash slots, MOVED, ASK, resharding, gossip, replica election)
- How Redis's Keyspace Dict Rehashes (dict.c, hash & sizemask, ht[0]/ht[1], rehashidx, incremental rehashing, BGSAVE ratio 5, shrink, SCAN cursor)
- How a Redis Sorted Set Is Stored (zset, listpack, skiplist, spans, ZRANK, leaderboard)
- How Redis Stores Small and Large Values (OBJECT ENCODING, redisObject, int, embstr, raw, SDS, listpack, intset, hashtable, quicklist, skiplist, memory per key)
- How Redis Forgets Keys: Expiry and Eviction (expires dict, lazy expiry, activeExpireCycle, maxmemory-policy, approximated LRU, eviction pool, LFU, OOM)
- How Redis Saves Data: RDB Snapshots and the AOF (BGSAVE, fork, appendfsync, BGREWRITEAOF, multi-part AOF, aof-load-truncated)
- How Redis Replicas Sync: PSYNC and the Backlog (replid, offset, replication backlog, FULLRESYNC, +CONTINUE, REPLCONF ACK, WAIT, min-replicas-to-write, replid2, failover)
- Redis Streams and Consumer Groups (XADD, rax, listpack, XREADGROUP, PEL, XACK, XAUTOCLAIM, MAXLEN ~, dead letter)
- Redis Transactions and Scripts (MULTI, EXEC, QUEUED, EXECABORT, no rollback, WATCH, CLIENT_DIRTY_CAS, check-and-set, EVAL, Lua, BUSY, SCRIPT KILL)
- Distributed Locks and Fencing Tokens (Redis SET NX PX, TTL, check-and-delete, GC pause, stale write, fencing token, Redlock, etcd lease)
- Cache Strategies Side by Side (cache-aside, write-through, write-behind, refresh-ahead, TTL, stale reads, coalescing, lost writes, cold cache)
- Circuit Breaker and Bulkhead (cascading failure, CLOSED / OPEN / HALF_OPEN, sliding window, fallback, timeouts, Resilience4j)
- Monolith vs Microservices (side by side: function call vs network call, latency, one transaction vs compensation, failure isolation, independent deploy, scaling the hot service, timeout, retry, Idempotency-Key, modular monolith)
- Distributed Tracing with OpenTelemetry (traces, spans, span kinds, traceparent, context propagation, OTLP, Collector, waterfall, head vs tail sampling)
- Rate Limiting: Token Bucket vs Leaky Bucket (rate limiter, burst, refill rate, 429 Too Many Requests, Retry-After, queueing delay, nginx limit_req)
- Backpressure: When the Producer Is Faster than the Consumer (unbounded queue, OOM kill, bounded queue, block, drop newest, drop oldest, Reactive Streams request(n))
- Latency vs Throughput (queueing, throughput ceiling, utilization, p50 vs p99 tail latency, Little's Law, batching, 503 back-pressure, hockey-stick curve)
- Kubernetes Cluster Architecture (k8s, control plane, kube-apiserver, etcd, scheduler, controller-manager, kubelet, Deployment, ReplicaSet, watch, reconcile, rolling update, node failure)
- The Life of a Kubernetes Pod (scheduler, kubelet, init containers, probes, phases, CrashLoopBackOff, ImagePullBackOff, OOMKilled, SIGTERM, eviction, Jobs)
- How Kubernetes Talks to containerd and Docker (kubelet, CRI, gRPC, RunPodSandbox, pause container, containerd, CRI plugin, shim, runc, dockershim, cri-dockerd, dockerd, crictl, ctr, ImagePullBackOff)
- Kubernetes Container Lifecycle Hooks (k8s, postStart, preStop, exec, httpGet, sleep, grace period, SIGTERM, SIGKILL, endpoint race, FailedPostStartHook, FailedPreStopHook)
- How the Kubernetes Control Plane and Nodes Talk (k8s, hub and spoke, TLS bootstrapping, kubelet :10250, service account token, --kubelet-certificate-authority, MITM, apiserver proxy, Konnectivity, SSH tunnels)
- Bitcoin Merkle Trees and SPV Proofs (merkle root, block header, txid, duplicate last hash, Merkle branch, light client, tamper detection)
- Object Storage: How an S3-style Store Keeps a File (bucket, key, metadata service, erasure coding, data shards, parity shards, Reed-Solomon, reconstruct on GET, write quorum, versioning, version id, delete marker)
- Proof of Work: Mining a Chain of Blocks (nonce, SHA-256, target, difficulty, expected tries, prev hash, genesis block, tamper-evident chain, redoing the work, longest chain, 51% attack)
Software Design
- SOLID Principles (single responsibility, open/closed, Liskov substitution, interface segregation, dependency inversion: violates vs follows under the same change)
- Hexagonal Architecture: Ports and Adapters (driving and driven ports, adapters, dependency inversion, composition root, swapping adapters, testing with fakes, leaky core)
- The Observer Pattern vs Publish–Subscribe (subject, observers list, attach, detach, notify, synchronous calls, publisher, broker, topic, subscription queue, ack, slow listener, offline buffering, unsubscribe)
- Virtual DOM Diffing: How React Reconciles (render, diff, same vs different type, remount, keys, index as key, DOM patches)
- Strategy and Factory Method Patterns (strategy interface, concrete strategies, factory registry, swap at runtime, if/else vs polymorphism, open/closed principle, null object, fail fast on unknown type)
- Inheritance vs Composition (is-a vs has-a, method lookup, delegation, Liskov substitution, FlyingBird refactor, class explosion, copied code, swap behaviour at runtime, composition over inheritance)
- Decorator, Proxy and Adapter: Wrappers That Share One Interface (wrapper chain, logging, retry, caching proxy, protection proxy, virtual proxy, lazy initialization, adapter, adaptee)
- The Command Pattern: Undo and Redo (command objects, execute and undo, invoker and receiver, undo stack, redo stack, history limit, macro / composite command)
- The State Pattern (Context, State interface, concrete states, delegation, setState, rejecting illegal requests, final states, switch on an enum)
- Git Three-Way Merge (merge base, git merge-base, base / ours / theirs, per-hunk rules, auto-merge, conflict markers, resolve, merge commit, fast-forward, ort)
- Git Packfiles (loose objects, git gc, git repack, delta compression, OFS_DELTA, delta chains, pack index, fanout table, binary search)
- Git Merge vs Rebase (merge commit, two parents, replayed commits, new hashes, fast-forward, --ff-only, reflog, golden rule)
- Git Branches and HEAD: Pointers to Commits (refs, .git/HEAD, symbolic ref, git commit, git branch, git checkout, detached HEAD, unreachable commit, reflog, HEAD@{1}, reset --hard)
- Git Objects: Blobs, Trees and Commits (.git/objects, SHA-1 object IDs, content addressing, git add, index, git commit, tree, commit object, deduplication, dangling objects)
Networking
- Internet Protocol Layers (OSI vs TCP/IP, encapsulation, Ethernet, ARP, IP, TTL, NAT, MTU, fragmentation, ICMP, traceroute)
- How Ethernet Switches Forward Frames (MAC address table, learning, flooding, unknown unicast, broadcast, aging, MAC move, broadcast storm, Spanning Tree, BPDU, root bridge, blocking port, VLAN, 802.1Q trunk)
- Cyclic Redundancy Check (CRC, generator polynomial, XOR long division, remainder, frame check sequence, flipped bit, burst error, undetected error, CRC-32, LFSR)
- How ARP Finds a MAC Address (ARP request and reply, ARP cache, REACHABLE, STALE, DELAY, PROBE, switch MAC table, next hop, gratuitous ARP, ARP spoofing)
- How a Router Forwards a Packet (routing table, longest prefix match, default route, next hop, ARP, TTL, header checksum, ICMP Time Exceeded, Destination Unreachable, Path MTU Discovery, RIB vs FIB, administrative distance, floating static)
- Hub vs Switch vs Router (layer 1 vs 2 vs 3, repeater, CSMA/CD, collision, half vs full duplex, MAC learning, flooding, default gateway, routing table, ARP, TTL, MAC rewrite, broadcast, sniffing, collision domain, broadcast domain)
- Anycast and BGP: One Address, Many Sites (anycast, BGP, autonomous system, AS_PATH, UPDATE, WITHDRAW, best path selection, LOCAL_PREF, failover, BGP hijack, route leak, longest prefix match, RPKI, ROA, route origin validation)
- How NAT Shares One Public Address (SNAT, conntrack table, port preservation, port forwarding, timeouts, full cone vs symmetric, STUN, hole punching, hairpin)
- IPv4 vs IPv6 (32-bit vs 128-bit addresses, header fields, DHCP vs SLAAC, Router Advertisement, EUI-64, DAD, NAT vs global address, fragmentation, ICMPv6 Packet Too Big, path MTU black hole, header checksum, Hop limit)
- How Docker Networking Works on One Host (docker0, user-defined bridge, veth pair, network namespace, ARP, bridge fdb, embedded DNS, 127.0.0.11, iptables, MASQUERADE, SNAT, DNAT, DOCKER chain, -p 8080:80, conntrack, network isolation, --network host, --network none, overlay)
- How a VPN Works: a WireGuard Tunnel (wg0, routing table, AllowedIPs, encapsulation, UDP 51820, handshake, session keys, counter, replay, MASQUERADE, full vs split tunnel, DNS leak, MTU 1420, PersistentKeepalive)
- Forward Proxy vs Reverse Proxy, Side by Side (Squid, nginx, who sees which IP, CONNECT tunnel, TLS termination, load balancing, caching, ACL, X-Forwarded-For leak vs real client IP)
- How a Device Gets an IP Address (DHCP, DORA, lease table, T1 renew, T2 rebind, ARP probe, DECLINE, NAK, INIT-REBOOT)
- The Life of an HTTP Request in Kubernetes (pod, veth, cni0, Service, kube-proxy, iptables DNAT, conntrack, VXLAN, NodePort, Ingress, egress)
- Kubernetes Service Types (k8s, ClusterIP, NodePort, LoadBalancer, ExternalName, headless Service, kube-proxy, CoreDNS, cloud-controller-manager, EXTERNAL-IP pending)
- How a DNS Name Is Resolved (stub, recursive resolver, root, TLD, authoritative, caching, TTL)
- NTP: How a Clock Sets Itself From Four Timestamps (Network Time Protocol, clock synchronization, clock offset, round-trip delay, T1 T2 T3 T4, asymmetric path, clock filter, step, slew, 500 ppm, panic threshold, ntpd, stratum, pool.ntp.org)
- How a CDN and Route 53 Work (CloudFront, edge location, POP, regional edge cache, cache key, X-Cache Hit / Miss / RefreshHit, Cache-Control max-age, Age, ETag, 304, invalidation, alias record, latency routing, failover routing, weighted routing, health checks, DNS TTL)
- How an API Gateway Handles a Request (Kong, Envoy, AWS API Gateway, routing, path rewrite, API key, JWT, JWKS, scopes, 401 vs 403, rate limiting, 429 Retry-After, response cache, X-Request-Id, 502 vs 504, upstream timeout, aggregation, BFF)
- TCP vs UDP (handshake, ACKs, retransmission, head-of-line blocking, byte stream vs datagrams, flow control, connection states)
- ARQ: Stop-and-Wait vs Go-Back-N vs Selective Repeat (sliding window, cumulative ACKs, selective repeat, timeouts, retransmission, sequence-number wrap)
- How TCP Congestion Control Works (slow start, AIMD, fast retransmit, fast recovery, cwnd chart)
- How an HTTP Connection Is Established (DNS, TCP handshake, request, close)
- A TCP Socket in Linux (socket, bind, listen, accept queue, connect, accept, send buffer, receive buffer, receive window, blocking recv, ECONNREFUSED, CLOSE_WAIT, TIME_WAIT)
- The Linux Listen Backlog (SYN queue, accept queue, backlog, somaxconn, ListenOverflows, ListenDrops, SYN retries, tcp_abort_on_overflow, SYN flood, SYN cookies, ss -lnt)
- Unix Socket vs TCP on Loopback (AF_UNIX, 127.0.0.1, loopback device, softirq, 3-way handshake, socket file permissions, docker.sock, SO_PEERCRED, SCM_RIGHTS, fd passing)
- TCP Three-Way Handshake and the Listen Queues (SYN, SYN/ACK, ACK, SYN_SENT, SYN_RCVD, ESTABLISHED, incomplete queue, completed queue, backlog, accept, SYN retry, lost ACK)
- How an HTTPS Connection Is Established (TLS 1.3 handshake, certificates, keys)
- TLS Certificate Chain and Revocation (leaf, intermediate, root, trust store, chain building, basicConstraints, SAN, expired, self-signed, CRL, OCSP, OCSP stapling, must-staple, soft-fail, Certificate Transparency)
- HTTP/1.1 vs HTTP/2 vs HTTP/3 (connections, multiplexing, HPACK, head-of-line blocking, QUIC)
- The QUIC Handshake vs TCP + TLS 1.3 (HTTP/3, Initial, Handshake, 1-RTT, 0-RTT, replay, 425 Too Early, head-of-line blocking, connection ID, connection migration, PATH_CHALLENGE)
- WebSocket vs SSE vs Long Polling (server push, short polling, long polling, Server-Sent Events, text/event-stream, Last-Event-ID, WebSocket upgrade, 101, frames, masking, ping/pong, keepalive, reconnect)
- How a gRPC Call Travels over HTTP/2 (protobuf, unary and streaming RPCs, HTTP/2 streams, trailers, grpc-status, deadlines, RST_STREAM, flow control, WINDOW_UPDATE, pick_first, round_robin, retries)
- REST vs GraphQL vs gRPC (side by side: round trips, over-fetching, under-fetching, JSON vs protobuf, HTTP cache, ETag, 304, polling, subscriptions, server streaming)
- How HTTP Caching Works: Browser Cache, CDN and Origin (Cache-Control, max-age, Age, ETag, If-None-Match, Last-Modified, If-Modified-Since, 304 Not Modified, no-cache, no-store, cache busting)
- TCP Flow Control: the Receive Window (rwnd, receive buffer, min(cwnd, rwnd), slow reader, backpressure, zero window, persist timer, zero-window probe, window update, window scaling, silly window syndrome)
- How Traceroute Works (TTL, ICMP Time Exceeded, Port Unreachable, Echo Reply, round-trip time per hop, * * * silent routers, firewall, traceroute -I, tracert)
- VLANs: One Switch, Several Networks (VLAN, broadcast domain, access port, trunk port, 802.1Q tag, VLAN ID, allowed VLAN list, per-VLAN MAC table, inter-VLAN routing, router-on-a-stick, subinterface)
- Wi-Fi CSMA/CA (802.11 DCF, listen before talk, DIFS, SIFS, random backoff, contention window, ACK, collision, hidden node, RTS/CTS, NAV)
Web & Security
- How Browser Cookies Work (Set-Cookie, Domain, Path, Secure, HttpOnly, SameSite, CSRF, XSS, third-party tracking)
- CORS and the Preflight Request (same-origin policy, origin, simple request, OPTIONS preflight, Access-Control-Allow-Origin, credentials, Max-Age, CSRF)
- CSRF and SameSite Cookies (cross-site request forgery, SameSite None, Lax, Strict, Lax+POST, site vs origin, CSRF token, double-submit, Origin check, Sec-Fetch-Site)
- XSS and Content-Security-Policy (cross-site scripting, stored, reflected, DOM-based, output encoding, innerHTML, textContent, javascript: URL, HttpOnly, CSP, nonce, strict-dynamic, unsafe-inline, Report-Only)
- How OAuth 2.0 Works (authorization code, PKCE, state, access and refresh tokens, scopes, OpenID Connect, client credentials, device grant)
- JWT vs Session Cookies (stateless vs stateful, signature, exp, logout, revocation, denylist, refresh token rotation, reuse detection, HttpOnly, localStorage, XSS, alg none)
- HttpOnly Cookie vs localStorage (login token, HttpOnly, localStorage, Authorization Bearer, XSS token theft, session riding, CSRF, SameSite None, Lax, Strict, Max-Age, logout)
- How a Digital Signature Works (RSA keys, hash, sign, verify, certificates, forgery)
- How Diffie-Hellman Key Exchange Works (p = 23, g = 5, A = g^a mod p, shared secret, discrete logarithm, man in the middle, signed share, ECDHE, forward secrecy)
- Salt vs Pepper: Storing Passwords (password hashing, salt, pepper, HMAC, argon2id, bcrypt, rainbow table, dictionary attack, database leak)
- Symmetric vs Asymmetric Encryption (shared key, public key, private key, RSA, AES, key distribution, hybrid encryption, session key, man-in-the-middle)
- Encryption vs Hashing (key, ciphertext, decrypt, SHA-256 digest, one-way, avalanche, checksum, HMAC, salted password hashes)
- Inside AES-128 and SHA-256 (4x4 state, S-box, SubBytes, ShiftRows, MixColumns, AddRoundKey, key schedule, Rcon, padding, message schedule, W0..W63, a..h registers, Σ, Ch, Maj, final add, avalanche, FIPS-197, FIPS 180-4)
- OWASP A02:2025 Security Misconfiguration (default credentials, debug errors, directory listing, clickjacking headers, public bucket, XXE)
- OWASP A04:2025 Cryptographic Failures (TLS, HSTS, bcrypt, salt, MD5, AES-ECB vs GCM, hard-coded keys, CSPRNG tokens)
- OWASP A06:2025 Insecure Design (business logic, race condition, TOCTOU, OTP brute force, password reset, workflow state machine, threat modelling)
- OWASP A07:2025 Authentication Failures (credential stuffing, brute force, rate limiting, MFA, user enumeration, session fixation, logout, remember-me tokens)
- How Passkeys Sign You In (WebAuthn, FIDO2, public key per site, challenge, clientDataJSON, origin, rpId, authenticatorData, UP and UV flags, signCount, phishing-resistant, replay, cloned key)
- OWASP A08:2025 Software or Data Integrity Failures (HMAC-signed cookie, JWT alg none, Subresource Integrity, insecure deserialization)
- How Kerberos Works (KDC, AS-REQ, TGT, TGS-REQ, service ticket, AP-REQ, authenticator, user key, krbtgt key, service key, session keys, pre-authentication, clock skew, replay cache, ticket expiry, single sign-on)
- Mutual TLS: Both Sides Show a Certificate (mTLS, client certificates, CertificateRequest, CertificateVerify, SPIFFE, SVID, service mesh, one-way TLS)
- Password Hashing: Fast vs Slow Hashes (SHA-256, MD5, PBKDF2, bcrypt cost factor, scrypt, Argon2id, memory-hard, GPU cracking, guesses per second, salt)
- Server-Side Request Forgery (SSRF, link preview, 169.254.169.254, instance metadata, IMDSv1, IMDSv2, internal admin service, blocklist bypass, decimal IP, DNS rebinding, TTL 0, TOCTOU, resolve and pin IP, allowlist, egress firewall)
Servers & Event Loops
- How Tomcat handles an HTTP request (Acceptor, Poller, thread pool, valves, servlet)
- How nginx Handles an HTTP Request (event loop, phases, filters, proxy)
- nginx Proxy Request: Memory, System Calls and Kernel (user vs kernel space)
- Load Balancer: L4 vs L7 (layer 4, layer 7, round robin, least connections, source-IP hash, sticky cookie, health checks, retries, proxy_next_upstream, TLS termination, keep-alive pool, HTTP/2 streams, HAProxy, nginx upstream)
- Scale Up vs Scale Out: vertical vs horizontal scaling (resize downtime, instance sizes, hardware ceiling, load balancer, single point of failure, N+1, health checks, stateless nodes, session store, Redis, cost, latency)
- Canary, Blue/Green and Rolling Deployments (canary release, blue/green, rolling update, maxSurge, maxUnavailable, readiness probe, weighted target groups, ALB, Argo Rollouts, CodeDeploy, analysis, automatic rollback, bake time, smoke test, weighted DNS, TTL, expand/contract)
- A/B Testing (online experiment, hash bucketing, exposure, conversion rate, two-proportion z-test, p-value, confidence interval, sample size, power, peeking, A/A test, sample ratio mismatch)
- Linux epoll (interest list, ready list, level vs edge triggered)
- How a request is handled in Tomcat and Linux epoll (Acceptor, Poller, epoll_ctl, RB-tree, ready list, wait queue, epoll_wait, worker pool, OP_WRITE, keep-alive)
- io_uring vs epoll (readiness vs completion, epoll_wait, read, SQ ring, CQ ring, SQE, CQE, io_uring_enter, batching, SQPOLL, async file I/O, syscall count)
- Blocking vs Non-blocking vs Async I/O (read, O_NONBLOCK, EAGAIN, busy polling, epoll_wait, io_uring, thread per connection, C10K, context switches, syscalls)
- Reactor vs Proactor (readiness vs completion, event demultiplexer, dispatcher, completion handler, epoll_wait, io_uring, IOCP, worker pool, partial reads)
- The Node.js Event Loop (call stack, process.nextTick, promise microtasks, libuv phases, poll, setImmediate, thread pool, blocking)
- How the Browser Runs JavaScript: the Event Loop (main thread, task queues, microtasks, requestAnimationFrame, rendering, long tasks, async, defer)
- Server-side vs Client-side Rendering (SSR vs CSR, hydration, first paint, interactive, client-side routing, SEO crawlers)
- Node.js Under the Hood: libuv and Where the Work Runs (C++ bindings, libuv thread pool, UV_THREADPOOL_SIZE, epoll, uv_async_send, dns.lookup vs dns.resolve, c-ares, pbkdf2Sync, worker_threads)
- How Redis Serves Many Connections with One Thread (event loop, epoll, querybuf, serial execution, pipelining, slow commands, io-threads)
Operating Systems
- How Linux Boots (power on, reset vector, BIOS vs UEFI, MBR, ESP, Secure Boot, shim, GRUB, kernel command line, start_kernel, PID 1, initramfs, switch_root, systemd, targets, grub rescue, kernel panic, emergency mode)
- systemd Units: Dependencies, Restart and Socket Activation (unit files, multi-user.target, jobs, transactions, parallel start, Requires=, Wants=, After=, dependency failed, Restart=on-failure, RestartSec, StartLimitBurst, start-limit-hit, socket activation, LISTEN_FDS, sd_listen_fds, journalctl)
- How a C Program Is Compiled, Linked, Loaded and Started (preprocessor, cc1, as, ld, object files, relocations, static vs dynamic, PLT/GOT, ld.so)
- Little-Endian vs Big-Endian (byte order, endianness, network byte order, htonl, ntohl, bswap, x86)
- Static vs Dynamic Linking, side by side (libc.a vs libc.so.6, binary size, ld.so, PLT/GOT lazy binding, libc updates, shared memory, GLIBC version errors)
- How a C/C++ Program Is Compiled and Run: What C++ Adds (g++, cc1plus, name mangling, Itanium ABI, extern "C", templates, inline, COMDAT, one-definition rule, .init_array, __cxa_atexit, static constructors, libstdc++)
- How Linux Loads a Program (fork, execve, ELF, ld.so, page faults: from disk to main)
- A Linux System Call, Step by Step (glibc wrapper, syscall instruction, user and kernel mode, pt_regs, sys_call_table, copy_from_user, errno, blocking read, vDSO)
- How Linux Delivers a Signal (kill, pending set, TIF_SIGPENDING, sigaction, signal frame, rt_sigreturn, SIGKILL, EINTR vs SA_RESTART)
- How strace and gdb Work (ptrace, PTRACE_TRACEME, PTRACE_ATTACH, PTRACE_SYSCALL, syscall-entry and syscall-exit stops, wait4, SIGTRAP, PTRACE_GETREGS, orig_rax, context switches, int3 breakpoint, PTRACE_POKETEXT, PTRACE_SINGLESTEP, ptrace_scope, EPERM)
- TTY, PTY and Job Control: What Ctrl-C Really Does (pty master, pty slave, /dev/pts, sshd, line discipline, N_TTY, canonical mode, echo, termios, ISIG, SIGINT, SIGTSTP, SIGTTIN, SIGHUP, process group, session, tcsetpgrp, foreground job, bg, fg, nohup)
- What a Container Really Is (docker run, containerd, runc, namespaces, cgroups v2, memory.max, OOM kill, cpu.max, throttling, pids.max, OverlayFS, copy-up, whiteout, veth, bridge)
- seccomp and eBPF: Programs Inside the Kernel (seccomp filter, seccomp_data, SECCOMP_RET_ALLOW, ERRNO, KILL_PROCESS, LOG, Docker default profile, bpf(), verifier, JIT, kprobe, BPF map, bpftrace)
- How a Dockerfile Becomes Image Layers (Dockerfile, layers, sha256 digest, manifest, build cache, CACHED, cache invalidation, COPY package.json, npm install, OverlayFS, lowerdir, upperdir, merged, copy-up, whiteout, docker push, docker pull, registry)
- Linux Context Switch (schedule(), switch_mm, switch_to, pt_regs, CR3 and TLB)
- Process vs Thread, side by side (fork vs pthread_create, clone flags, address space, page table, copy-on-write, shared counter, lost update, pipe vs shared memory, SIGSEGV kills all threads)
- The Interrupt-Driven I/O Cycle (IRQ, PIC, IDT, interrupt handler, iret, polling vs interrupts vs DMA)
- Kinds of Interrupts in Linux (device IRQ, top half, softirq, timer tick, jiffies, NMI, page fault, system call, IDT, local APIC)
- CPU Scheduling (FCFS, SJF, SRTF, RR, priority, CFS)
- Linux Load Average, Explained (uptime, top, /proc/loadavg, runnable R, uninterruptible D, run queue, cores, calc_global_load, LOAD_FREQ, EXP_1, exponential moving average, iowait, NFS hang)
- Preemptive vs Cooperative scheduling (timer interrupt, quantum, yield, context switch, starvation, runaway loop, lost update, round robin, event loop)
- Real-Time Scheduling and Priority Inversion (SCHED_FIFO, SCHED_RR, SCHED_OTHER, RT priority, time slice, RT throttling, priority inversion, priority inheritance, PTHREAD_PRIO_INHERIT, rt_mutex, PI futex, Mars Pathfinder, watchdog)
- Disk Scheduling (FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK, seek distance, starvation, elevator algorithm)
- Banker's Algorithm (deadlock avoidance, Allocation, Max, Need, Available, safety algorithm, safe sequence, resource request, unsafe state)
- Linux Virtual Memory (page table walk, TLB, page faults, copy-on-write, huge pages)
- The TLB and the x86-64 Page Walk (TLB hit vs miss, CR3, PML4, PDPT, PD, PT, page walk, TLB fill, LRU eviction, huge pages, PS bit, PCID, ASID, context switch flush, page fault)
- Copy-on-Write fork() (page table, COW, reference count, page fault, fork + exec, vfork, posix_spawn, Redis BGSAVE, overcommit)
- A Linux Process from fork() to Reaping (fork, execve, exit, wait, waitpid, WNOHANG, WEXITSTATUS, zombie, defunct, SIGCHLD, orphan, reparenting, PID 1, PR_SET_CHILD_SUBREAPER, SIG_IGN, tini, docker --init)
- How the Shell Runs ls | grep foo (pipe, fork, dup2, close, execve, fd table, 64 KiB pipe buffer, EOF, SIGPIPE, EPIPE, PIPESTATUS)
- Paging and Page Replacement (address split, TLB, page faults, FIFO / clock / LRU, Belady, swap, copy-on-write)
- Paging vs Segmentation (base and limit, page table, external vs internal fragmentation, compaction, flat segments, FS/GS on Linux)
- Direct Memory Access: How a NIC Moves Packets (PIO vs DMA, descriptor rings, NAPI, IOMMU, cache coherency, bounce buffers)
- How Linux Receives a Packet (NIC, RX ring, DMA, hard IRQ, NAPI, softirq, netdev_budget, GRO, sk_buff, netfilter, PREROUTING, INPUT, TCP receive queue, rmem, zero window, RST, recv)
- How a File System Survives a Crash (inode, dentry, page cache, dirty page, writeback, fsync, journal, jbd2, ordered mode, commit block, recovery, delayed allocation, rename, hard link, symlink, unlink)
- The Page Cache: read vs mmap (page cache, read-ahead, copy_to_user, page fault, PTE, MAP_SHARED, MAP_PRIVATE, dirty page, msync, writeback, copy on write)
- How a Hard Disk Reads and Writes Data (seek, rotational latency, LBA, NCQ, read-ahead, write cache, FLUSH CACHE, FUA, bad sector remapping)
- How an SSD Reads and Writes Data (NVMe, FTL, NAND pages and blocks, garbage collection, TRIM, write amplification)
- The Linux Block Layer: How a Write Reaches the Disk (page cache, dirty page, writeback, fsync, bio, submit_bio, blk-mq, plug, request merging, I/O scheduler, mq-deadline vs none, NVMe submission queue, doorbell, DMA, completion queue, bio_endio, cache flush)
- What open() Does: Linux VFS Path Lookup (path walk, link_path_walk, dentry cache, dcache hit and miss, negative dentry, ext4_lookup, x permission, EACCES, mount point, vfsmount, symlink, struct file, f_pos, fd table, dup, fork)
- Linux Permissions: uid, rwx, setuid and Capabilities (struct cred, ruid, euid, fsuid, groups, owner group other, rwx, mode bits, generic_permission, EACCES, CAP_DAC_OVERRIDE, setuid, passwd, /etc/shadow, CAP_NET_BIND_SERVICE, setcap, user namespace, uid_map)
- The Buddy Allocator (free_area lists, split, buddy merge with XOR, fragmentation, compaction)
- Linux Out of Memory: Reclaim, kswapd and the OOM Killer (free memory, min/low/high watermarks, page cache, active/inactive LRU, kswapd, direct reclaim, swap, oom_score, oom_score_adj, memcg OOM, memory.max)
- NUMA: Local and Remote Memory (NUMA node, UPI, local vs remote latency, first touch, numactl, interleave, membind, preferred, numastat, numa_maps, NUMA balancing, hinting fault, page migration)
- Stack vs Heap in C (stack frames, rsp/rbp, glibc malloc, tcache, brk, mmap, use after free, double free, leaks, stack overflow)
Concurrency
- Concurrency vs Parallelism (time slicing, multicore, I/O-bound vs CPU-bound, Amdahl's law, race on one core)
- Bounded Buffer / Producer–Consumer (semaphores, monitors, lost items, deadlock)
- Monitor & Condition Variables (mutex, entry queue, wait set, while vs if, signal vs broadcast, stolen and lost wake-ups)
- Readers–Writers Problem (readers-preference, writers-preference, fair, starvation)
- Dining Philosophers (deadlock, Coffman conditions, resource ordering, livelock, starvation)
- Test-and-Set Spinlock (atomic read-and-write, spinning, lock holder preempted, test-then-set race, lost update, test-and-test-and-set)
- Compare-and-Swap (CAS) (lock-free counter, retry loop, failed CAS, lost update, lock-free vs wait-free, ABA problem, LL/SC)
- Spinlock (xchg, spinning, wasted CPU time, long critical section, holder preempted)
- Mutex with a Futex (fast path, futex_wait, futex_wake, sleep and wake, EAGAIN race)
- Mutex vs Spinlock, side by side (spinning vs futex sleep, futex_wait, futex_wake, hold time, preempted holder, adaptive mutex)
- How a Mutex Works: the Futex (futex lock word, 3 states, cmpxchg fast path, FUTEX_WAIT, FUTEX_WAKE, futex hash bucket, EAGAIN, lost wake-up, wake one)
- Readers–Writer Lock (shared reads, exclusive writes, writer starvation, prefer readers vs prefer writers)
- Read-Copy-Update (RCU) (rcu_read_lock, rcu_dereference, rcu_assign_pointer, grace period, quiescent state, synchronize_rcu, call_rcu, use-after-free)
- Semaphore (sem_wait, sem_post, pool of N permits, signal between threads, no owner)
- Semaphore vs Condition Variable (same bounded buffer both ways, sem_wait/sem_post vs cond_wait/cond_signal, lost wake-up, spurious wake-up, while loop, broadcast, partial-acquire deadlock)
- The Go Scheduler (goroutines, G M P, GOMAXPROCS, runnext, local run queue, global run queue, work stealing, syscall handoff, sysmon, netpoller, channels, preemption)
- OS Threads vs Goroutines (1:1 vs M:N, G M P, 1 MB vs 2 KB stacks, switch cost, blocking syscall handoff, netpoller, thread exhaustion, preemption)
- Inside a Goroutine (g struct, goid, atomicstatus, gobuf, 2 KB stack, stackguard0, newproc, goexit, gopark, mcall, g0, gogo, morestack, copystack, shrinkstack, gFree)
- Coroutines: Stackful vs Stackless (resume, yield, generators, async/await, state machine, heap frame, function colouring, coroutine stack, context switch, Lua, Python, Kotlin, C++20)
- Thread Pool: Java ThreadPoolExecutor (corePoolSize, maximumPoolSize, work queue, RejectedExecutionHandler, AbortPolicy, CallerRunsPolicy, keepAliveTime)
- The Python GIL (Global Interpreter Lock, CPython threads, switch interval, gil_drop_request, CPU-bound vs I/O-bound, convoy effect, multiprocessing, free-threaded 3.13t, PEP 703)
Computer Architecture
- Levels of Abstraction in a Computer (application, OS, architecture, microarchitecture, logic, digital and analog circuits, devices, physics, leaky abstractions)
- Sequential Logic: Latches, Flip-Flops, Registers and Counters (SR latch, D latch, master–slave flip-flop, register, enable, synchronous reset, setup and hold time, metastability, maximum clock frequency)
- A Latch and a Flip-Flop Built from Transistors (transmission gate, nMOS, pMOS, 12-transistor CMOS D latch, inverter loop, master–slave D flip-flop, dynamic latch)
- Timing Analysis: Setup, Hold, Clock Skew and Synchronizers (register to register path, t_pcq, t_ccq, t_setup, t_hold, t_pd, t_cd, setup slack, hold slack, critical path, pipelining, buffers, clock skew, metastability, 2-flip-flop synchronizer)
- Finite State Machines: Moore, Mealy, Encodings and Factoring (state register, next-state logic, output logic, traffic light controller, state transition table, binary vs one-hot, Moore vs Mealy, factoring, timing diagram)
- Logic Gates: NOT, Buffer, AND, OR, NAND, NOR, XOR, XNOR (truth tables, gate symbols, Boolean equations, inversion bubble, multiple-input gates, parity)
- Combinational Logic: Gates, Adders, Muxes and the ALU (truth tables, full adder, ripple carry, overflow, glitches, decoder, gate delays)
- Multilevel Logic, Bubble Pushing, and the Values X and Z (bubble pushing, De Morgan, NAND-NAND, NOR-NOR, multilevel vs two-level, tristate buffer, bus, floating Z, contention X)
- From Verilog to Hardware: What Synthesis Builds (SystemVerilog, synthesis, assign, gates, mux, always_ff, flip-flop, asynchronous reset, enable, always_comb, case, decoder, inferred latch, blocking vs nonblocking, shift register)
- Arithmetic Circuits: Fast Adders, Comparators, Shifters, Multiplier (carry-lookahead, generate and propagate, prefix adder, critical path, subtraction, overflow, flags, barrel shifter, array multiplier)
- Number Systems: Two's Complement, Fixed Point and IEEE 754 Floating Point (unsigned, two's complement, sign extension, overflow, fixed point, IEEE 754 single precision, biased exponent, denormals, NaN, floating-point addition, rounding, 0.1 + 0.2)
- Memory Arrays: DRAM, SRAM, ROM, Register Files, PLAs and FPGAs (decoder, wordline, bitline, sense amplifier, destructive read, refresh, bitline-bar, dot notation, multiported register file, PLA, lookup table)
- From C to MIPS Machine Code: Branches, Instruction Formats and Addressing Modes (if/else, while, slt, beq, bne, j, array access, lw, sw, R-type, I-type, J-type, opcode, funct, branch offset from PC + 4, pseudo-direct, stored program)
- Translating and Starting a MIPS Program (compiler, assembler two passes, symbol table, object file, relocations, linker, library, loader, $gp, $sp)
- MIPS Procedure Calls: jal, jr $ra, the Stack and Saved Registers (calling convention, $a0-$a3, $v0, $sp, stack frames, preserved and nonpreserved registers, recursive factorial)
- Building the Single-Cycle MIPS Datapath (Fig 7.2–7.9, lw, sw, R-type, sign extend, ALU, PC + 4, WriteData, RegDst, ALUSrc, MemtoReg)
- The Single-Cycle MIPS Processor (Control Unit, main decoder, ALU decoder, RegWrite, ALUSrc, MemtoReg, PCSrc, one instruction per clock)
- How a Program Runs on the MIPS Datapath (fetch, decode, execute, memory, write back)
- Exceptions in the MIPS Processor (syscall, overflow, undefined instruction, interrupt, EPC, Cause, coprocessor 0, mfc0, eret, 0x80000180, PCSrc, kernel mode, exception FSM states)
- The MIPS Pipeline: Hazards and Forwarding (pipeline registers, stalls, forwarding, branch flush, pipeline diagram)
- Branch Prediction on the MIPS Pipeline (branch target buffer, static prediction, BTFN, 1-bit, 2-bit saturating counter, gshare, misprediction penalty, flush, CPI)
- Single-Cycle vs Multicycle vs Pipelined MIPS: a Performance Race (execution time, instructions × CPI × Tc, clock period, critical path, pipeline fill, load-use stall, branch flush, speedup)
- Superscalar and Out-of-Order Execution with Register Renaming (RAW, WAR, WAW, scoreboard, rename table, free list, reorder buffer, IPC, speculation, squash)
- Parallel Hardware: SIMD, Multithreading and Multicore (SIMD, vector registers, lanes, packed arithmetic, hardware multithreading, thread context, coarse-grained, fine-grained, SMT, Hyper-Threading, multicore, Amdahl's law)
- How a CPU Cache Finds, Misses and Replaces (direct-mapped vs set-associative vs fully associative, LRU, write-back, AMAT)
- One Load Through the Memory Hierarchy (lw, TLB, page table walk, L1, L2, DRAM, disk, page fault, line fill, locality, latency in cycles, AMAT)
- DRAM Timing: Why Reading Memory in Order Is Fast (row buffer, ACTIVATE/RAS, READ/CAS, PRECHARGE, tRCD, CL, tRP, tRAS, row hit, row miss, DDR burst, bandwidth, refresh, tRFC)
- MESI Cache Coherence and False Sharing (M/E/S/I states, snooping bus, BusRd, BusRdX, RFO, BusUpgr, invalidation, writeback, cache-line ping-pong, padding, alignas(64), @Contended)
- Virtual Memory in Hardware: Page Table, TLB, Protection and Replacement (address translation, VPN and offset, page table register, page faults, use and dirty bits)
- Embedded I/O: Memory-Mapped I/O, GPIO, UART, SPI, Timers and Interrupts (address decoder, write enable, TRIS, LAT, PORT, polling, baud rate, framing error, parity, shift register, CPOL, CPHA, interrupt service routine)
- Register Allocation by Graph Coloring (liveness, live ranges, interference graph, Chaitin, Briggs, simplify and select, k registers, spill cost, spill to stack, MaxLive)
Java & the JVM
- Compiler vs Interpreter (ahead-of-time build, tree-walking interpreter, per-statement overhead, crossover, compile-time vs run-time errors, Exec format error, bytecode and JIT)
- How a Java Program Is Compiled and Run (javac phases, syntax tree, desugaring, bytecode, constant pool, class file, interpreter frames)
- How a Java Application Starts (launcher, JVM creation, CDS, class loading, first bytecode of main)
- HotSpot JIT Tiers (interpreter, C1, C2, profiling, inlining, deoptimization, OSR, code cache)
- How V8 Runs JavaScript (Ignition bytecode, feedback vectors, Sparkplug, Maglev, TurboFan, hidden classes, inline caches, deoptimization, OSR)
- Java Garbage Collectors: Parallel GC, G1, ZGC (generations, regions, concurrent marking, coloured pointers)
- Tracing GC vs Reference Counting (mark-sweep, refcount, cycles leak, stop-the-world pause, weak references, CPython, Swift ARC)
- Stack vs Heap in Java (JVM frames, locals and operand stack, TLAB bump allocation, object headers, pass by value, escape analysis, StackOverflowError, OutOfMemoryError)
- How Java's HashMap Works (hashCode, spread, (n - 1) & hash, bins, equals, load factor, resize, lo/hi split, treeify)
- How Java's TreeMap Works (red-black tree, Entry, compareTo, fixAfterInsertion, rotations, successor, floorKey, ceilingKey, headMap, modCount)
- How Java's ConcurrentHashMap Works (CAS, per-bin locks, lock-free get, CounterCell, ForwardingNode, helpTransfer, putIfAbsent)
- From a Java Thread to a CPU Core (Java thread, Linux task, TID, run queues, logical CPU, Hyper-Threading, physical core, virtual threads, carriers, pinning)
- Java ForkJoinPool and Work Stealing (RecursiveTask, fork, join, per-worker deques, stealing, helping, THRESHOLD, ManagedBlocker, common pool)
- Spring Core: IoC Container, Bean Lifecycle, Scopes, AOP Proxies (BeanDefinition, refresh, dependency injection, BeanPostProcessor, @Transactional proxy, self-invocation, circular dependencies, three-level cache)
- Inside a Tiny Compiler (lexer, tokens, maximal munch, recursive descent parser, grammar, precedence, associativity, abstract syntax tree, code generation, stack bytecode, virtual machine, compile-time vs run-time errors)
- Go's Garbage Collector (tri-colour marking, white grey black, write barrier, concurrent mark-sweep, GOGC pacing)
- How Java Loads a Class (bootstrap, platform and application class loaders, parent delegation, verify, prepare, resolve, static initialisation order, ClassNotFoundException, ExceptionInInitializerError)
- Java Memory Model: happens-before, volatile, synchronized (visibility, stale value, hoisting, reordering, store buffer, data race, release, acquire, monitor lock, safe publication)
- Python Garbage Collection: Reference Counting and the Cycle Collector (CPython, ob_refcnt, Py_DECREF, reference cycles, gc module, gc_refs, generations, gc.collect, thresholds)
- Java Virtual Threads vs Platform Threads (Project Loom, carrier threads, mount, unmount, Read-Poller, epoll, pinning, synchronized, JEP 444, JEP 491)
Machine Learning
- Gradient Descent (loss contour, learning rate, zig-zag, divergence, momentum, batch vs mini-batch vs SGD, local minima)
- SGD vs Momentum vs Adam (optimizers race, loss contour, narrow valley, saddle point, learning rate too high, divergence, β, m̂, √ŝ)
- Linear & Logistic Regression (residuals, MSE, gradient step, normal equation, sigmoid, log loss, decision boundary)
- L1 vs L2 Regularization (lasso, ridge, λ, diamond vs circle, exact zeros, feature selection, correlated features, overfitting)
- Perceptron Learning Rule (neuron, weights, bias, step activation, decision line, linear separability, XOR)
- K-Nearest Neighbors (KNN, classification, distance, Euclidean, Manhattan, K, majority vote, tie, feature scaling, min-max, curse of dimensionality)
- K-Means Clustering (Lloyd's algorithm, centroids, assignment step, update step, inertia, SSE, local optimum, k-means++, n_init, elbow method, choosing K)
- Supervised vs Unsupervised vs Reinforcement Learning (learning paradigms, labels, clusters, rewards, nearest class mean, k-means, contextual bandit, Q-value, ε-greedy, feedback)
- DBSCAN Density Clustering (eps, minPts, core / border / noise points, density-reachable, cluster expansion queue, moons and rings vs K-Means, choosing eps, k-distance plot)
- PCA vs t-SNE (dimensionality reduction, principal components, variance explained, t-SNE, perplexity, KL divergence, early exaggeration, neighbour embedding, stacked sheets, misleading cluster distances)
- Decision Tree Learning (ID3, CART, entropy, information gain, Gini impurity, best split, recursive partitioning, pure leaf, max_depth, overfitting, pruning, classification)
- Random Forest vs Gradient Boosting (bagging, bootstrap, out-of-bag, max_features, majority vote, boosting, residuals, stumps, learning rate, overfitting, early stopping, bias vs variance)
- Naive Bayes Spam Filter (word counts, priors, likelihoods, Laplace smoothing, log-probabilities, underflow)
- Precision vs Recall (threshold, confusion matrix, TP, FP, FN, TN, PR curve, F1 score, accuracy, imbalanced data, spam filter, cancer screening)
- Neural Network Forward Pass (neuron, weighted sum, bias, ReLU, sigmoid, tanh, W·x + b, softmax, dead ReLU)
- Neural Network: Recognizing Digits (784-16-16-10, MNIST-style, weights as pixels, bias, sigmoid, σ(W·a + b), 13,002 parameters)
- Backpropagation (2-2-1 network, XOR, forward pass, chain rule, deltas, weight gradients, vanishing gradient, dead ReLU, gradient check)
- Backpropagation Intuition (digit network, what outputs want, three ways, wishes passed back, mini-batch SGD)
- Draw a Digit: Neural Network Math (handwriting pad, MNIST, preprocessing, z = W·a + b, sigmoid, argmax, cost, chain rule, δ, gradient, gradient descent)
- Draw a Digit: Template Matching (average templates, MNIST, nearest centroid, squared distance, dot product, argmin, 82 % accuracy, no invariance)
- Softmax & Cross-Entropy (logits, softmax, log-sum-exp, numerical stability, cross-entropy loss, log-likelihood, gradient p − y, temperature, sigmoid vs softmax)
- Train a Tiny Network on Your Points (TensorFlow Playground, click to add points, hidden neurons as lines, decision boundary, tanh, sigmoid, cross-entropy, backpropagation, learning rate, overfitting)
- Convolution in a CNN (kernel, filter, feature map, Sobel edge detection, blur, sharpen, stride, zero padding, valid vs same, output size formula, ReLU, max-pooling)
- CNN vs Transformer: Receptive Field vs Self-Attention (convolutional neural network, vision transformer, ViT, image patches, receptive field, 3×3 kernel, self-attention, softmax, position embedding, permutation equivariance, parameters, FLOPs, N² cost)
- Recurrent Networks: RNN, LSTM and GRU (recurrent neural network, hidden state, unrolled over time, backpropagation through time, BPTT, vanishing gradient, LSTM, cell state, forget gate, input gate, output gate, GRU, update gate, reset gate)
- Self-Attention (Q·Kᵀ, √d_k scaling, causal mask, softmax, multi-head)
- Byte-Pair Encoding (BPE) Tokenizer (tokens, subwords, pair counts, merge rules, vocabulary size, tie-breaking, encoding unseen words, GPT-2 tokenizer)
- How a Large Language Model Works (LLM, GPT, transformer, tokens, BPE, embeddings, self-attention, query key value, causal mask, softmax, temperature, top-k, top-p, KV cache, context window, next-token loss)
- Decoding Strategies: Greedy vs Beam Search vs Top-p (greedy decoding, beam search, beam width, nucleus sampling, top-p, temperature, repetition loop, sentence probability, LLM text generation)
- LoRA and Quantization (low-rank adaptation, B·A, rank, alpha, merge, int8, int4, scale, zero-point, outliers, per-channel, per-group, QLoRA)
- How an AI Agent Works (Claude Code, agent loop, tool use, tool_use, tool_result, hooks, permissions, context window, prompt caching, compaction, subagents)
- Retrieval-Augmented Generation (RAG, chunking, chunk_size, overlap, embeddings, vector index, cosine similarity, top_k, prompt assembly, citations, stale index)
- HNSW Vector Search (vector database, approximate nearest neighbor, ANN, embeddings, layers, entry point, greedy search, beam search, ef, ef_construction, M, recall@k, brute force, skip list)
- MCP: the Model Context Protocol (host, client, server, JSON-RPC, stdio, Streamable HTTP, initialize, tools/list, tools/call, resources, prompts, isError, list_changed)
- BM25 vs Vector Search vs Hybrid (keyword search, BM25, idf, k1, b, inverted index, dense retrieval, embeddings, cosine similarity, hybrid search, reciprocal rank fusion, RRF, semantic search)
- Diffusion Model (DDPM, forward process, Gaussian noise, noise schedule, ᾱₜ, predict the noise ε, |ε − ε̂|² loss, reverse denoising, sampling steps, 2D ring)
- Dropout & Batch Normalization (dropout mask, inverted scaling 1/(1−p), batch mean and variance, γ and β, running statistics, model.train vs model.eval)
- The KV Cache (transformer decoding, prefill vs decode, K/V recompute vs append, memory per token and layer, grouped-query attention, PagedAttention, block table)
- Logistic Regression (sigmoid, decision boundary, log loss, gradient descent, 2D classifier)
- Mixture of Experts (MoE, router, softmax gating, top-k, top-2, Switch Transformer, Mixtral, expert capacity, capacity factor, overflow, dropped tokens, load-balancing loss, auxiliary loss, router collapse, sparse vs dense compute)
- RLHF vs DPO (reinforcement learning from human feedback, direct preference optimization, preference pairs, Bradley–Terry, reward model, PPO, KL penalty, reference model, β, implicit reward, alignment)
- Speculative Decoding: Draft Model and One-Pass Verification (draft model, target model, k draft tokens, verify, accepted prefix, correction token, bonus token, acceptance rate, speedup, speculative sampling)
- Support Vector Machine (maximum margin, support vectors, soft margin C, slack, kernel trick)
- Word2Vec (skip-gram, context window, negative sampling, word embeddings, king − man + woman = queen)
AI: Search, Games & Reasoning
- Minimax and Alpha-Beta Pruning (game tree, MAX and MIN, alpha, beta, pruning, move ordering, tic-tac-toe)
- Monte Carlo Tree Search (MCTS, UCT, selection, expansion, random playout, backpropagation, exploration constant, most visits)
- Constraint Satisfaction: Backtracking Search (CSP, map coloring, forward checking, MRV, AC-3, arc consistency)
- Simulated Annealing (local search, hill climbing, local maximum, random restart, temperature, e^(Δ/T), Metropolis rule, cooling schedule)
- Travelling Salesman Heuristics (TSP, nearest neighbour, 2-opt, edge swap, crossing edges, local optimum, Held–Karp, tour length)
- Genetic Algorithm (population, fitness, tournament selection, roulette wheel, crossover, mutation, elitism, premature convergence)
- Value Iteration (MDP, Bellman update, grid world, policy extraction, policy iteration, discount)
- Q-Learning in a Grid World (Q-table, update rule, TD error, ε-greedy, explore vs exploit, learning rate α, discount γ, off-policy, greedy policy)
- Bayesian Network Inference (CPT, enumeration, explaining away, d-separation)
- Viterbi Algorithm: Decoding a Hidden Markov Model (HMM, trellis, back-pointers, traceback, forward algorithm, log-probabilities, dynamic programming)