See every step.
Interactive visualisers with pseudocode for the algorithms in data structures, operating systems, databases, computer networks, theory of computation and compiler design courses, with practice questions.
Data structures & algorithms
- Sorting: Bubble, insertion, merge, quick, heap, radix and more, with pseudocode and live variables.
- Binary search tree: Insert, delete (all three cases), search, successor and the four traversals, with nodes gliding.
- AVL tree: Balance factors on every node and LL, RR, LR and RL rotations animated as they happen.
- Binary heap: Min and max heaps as an array and a tree at once: sift up, sift down, build-heap, decrease-key.
- Trie: Insert, search, prefix search, autocomplete and delete on a prefix tree that grows as you type.
- Union-find: Disjoint sets with union by rank or size and path compression, compared with naive union.
- Graph traversal: BFS and DFS with the queue, stack and edge types, plus components, cycles, bipartite check and topological sort.
- Minimum spanning tree: Kruskal with a live union-find forest and Prim with its priority queue, edge by edge.
- Shortest paths: Dijkstra, Bellman–Ford and Floyd–Warshall: every relaxation, negative cycles and the path rebuilt.
- Strongly connected components: Kosaraju's two passes on G and its reverse, Tarjan's disc/low stack, and the condensation DAG.
- Searching: Linear, binary, jump and interpolation search, plus lower and upper bound, probe by probe.
- Stacks & queues: Push, pop, circular queues and deques, bracket matching, infix to postfix and postfix evaluation.
- Linked lists: Singly, doubly and circular lists: insert, delete, reverse with moving arrows, and Floyd's cycle detection.
- Dynamic programming: DP tables filled cell by cell with traceback: LCS, edit distance, knapsack, coin change, matrix chain, LIS.
Operating systems
- CPU scheduling: FCFS, SJF, SRTF, HRRN, Priority, Round Robin, multilevel and feedback queues, with a live Gantt chart.
- Page replacement: FIFO, LRU, Optimal, LFU, MFU, the clock and NRU, frame by frame, plus working sets and Belady's anomaly.
- Disk scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK, N-step SCAN and F-SCAN, with the head's path drawn out.
- Banker's algorithm: Need matrix, safety check and a timeline of resource requests: is the system safe?
- Deadlock detection: Draw a resource-allocation graph and watch cycles and the detection algorithm.
- Semaphores & synchronisation: Producer–consumer, readers–writers, dining philosophers and race conditions. You pick who runs.
- Memory allocation: First, next, best and worst fit on a live memory bar, plus buddy-system splits and merges.
- Address translation: Paging with a TLB, multilevel page tables and segmentation: logical to physical, bit by bit.
- File systems and inodes: Inode direct and indirect pointers: maximum file size, and the disk reads to reach any byte. Plus contiguous, linked and indexed allocation.
Databases
- B+ tree: Insert, delete and search with every split, borrow and merge animated.
- B-tree: Keys in every node: median splits, predecessor and successor swaps, borrows and merges (CLRS t).
- Normalisation: Closures, candidate keys, 1NF to BCNF, minimal cover and decompositions.
- SQL joins: INNER, OUTER, SEMI and ANTI joins row by row, plus nested-loop, block nested-loop, sort-merge and hash join with I/O costs.
- Query processing: SQL to relational algebra trees, rewritten step by step: push selections down, reorder joins, estimate sizes.
- Serialisability: Precedence graphs, conflict and view serialisability, recoverable and strict schedules.
- Concurrency control: Two-phase locking with a lock table and deadlocks, timestamp ordering and validation, step by step.
- Log-based recovery: Crash anywhere in the log, then watch redo repeat history and undo roll back the losers.
- Hashing & indexing: Chaining, linear, quadratic and double hashing, plus extendible hashing.
- ER to relational: Draw an ER diagram in Chen notation, then map it to tables one rule at a time, with every key shown.
Computer networks
- Subnetting & VLSM: Network, broadcast and host range from any IPv4 address, in binary, plus a VLSM planner.
- Sliding window protocols: Stop-and-Wait, Go-Back-N and Selective Repeat on a timeline, with lost frames and ACKs.
- Routing algorithms: LSP flooding, Dijkstra and distance-vector routing, with packets hopping along the chosen path.
- TCP congestion control: Slow start, Tahoe, Reno and CUBIC round by round, plus the three-way handshake and teardown.
- Error detection & correction: CRC long division, Hamming codes that fix a flipped bit, and the Internet checksum.
- IP fragmentation: Split a datagram for a smaller MTU: fragment sizes, offsets and the MF flag.
- CIDR & longest prefix match: Forward a packet by longest prefix match, bit by bit, and summarise routes into supernets.
- MAC protocols: Pure and slotted ALOHA, CSMA/CD with binary exponential backoff, and CSMA/CA with RTS/CTS.
- Traffic shaping: Leaky and token buckets filling and draining tick by tick, plus the burst-length formula.
- DNS & HTTP: Iterative and recursive DNS lookups with caching, and HTTP page-load times for every connection type.
- OSI & TCP/IP encapsulation: A message going down the stack gaining headers, through a router that opens three layers, and back up, with every byte of overhead counted.
Theory of computation
- Finite automata: Run a DFA, NFA or ε-NFA on any string and watch the active states light up.
- NFA to DFA: The subset construction with ε-closures, the DFA growing one move at a time.
- DFA minimisation: Partition refinement: 0-, 1-, 2-equivalence until equivalent states merge.
- Regex to NFA: Thompson's construction, fragment by fragment, for any regular expression.
- DFA to regex & product: State elimination with edge labels rerouting as states vanish, plus union and intersection of DFAs.
- Pumping lemma: Play the pumping game against an adversary: pick s, it splits xyz, you pick i. Can you prove L isn't regular?
- Pushdown automata: Nondeterministic PDAs searched breadth first, the stack animated, and CFG → PDA.
- CFG to CNF and GNF: Chomsky normal form step by step (ε, unit and useless rules, binarise), then on to Greibach normal form.
- CYK parsing: Fill the CYK triangle cell by cell and get the parse tree for CNF grammars.
- Turing machine: A live tape and head: aⁿbⁿcⁿ, palindromes, binary increment, busy beaver.
Compiler design
- Lexical analysis: A maximal-munch lexer DFA turns characters into tokens and fills the symbol table.
- Left recursion & factoring: Remove direct and indirect left recursion, then left factor, rule by rule.
- FIRST & FOLLOW: Compute FIRST and FOLLOW sets pass by pass, with the reason for every symbol.
- LL(1) parsing: Predictive parsing table, conflicts, and a stack trace that grows the parse tree.
- Operator-precedence parsing: LEADING and TRAILING, the ⋖ ≐ ⋗ table, precedence functions and shift-reduce parses.
- LR parsing: LR(0), SLR, LALR and CLR: item sets, tables, conflicts and bottom-up parses.
- Syntax-directed translation: Annotated parse trees: synthesised and inherited attributes evaluated in dependency order.
- Three-address code & DAG: Syntax tree to TAC, DAG with common subexpressions, quadruples and triples.
- Code optimisation: Leaders, basic blocks and the flow graph, then folding, propagation, CSE and dead code, one rewrite at a time.
- Register allocation: Liveness to a fixed point, the interference graph, then Chaitin's simplify, spill and select with k registers.
Digital logic
- Number systems: Base conversion with every division and multiplication, fractions included, plus 1's and 2's complement and overflow.
- K-map minimiser: Karnaugh maps for 2 to 5 variables with don't-cares: prime implicants, essential ones, minimal SOP and POS, and Quine-McCluskey.
- Combinational circuits: Multiplexers, decoders, half and full adders, ripple-carry delay and comparators, with live values on every wire.
- Sequential circuits: SR, JK, D and T flip-flops with timing diagrams, conversions, synchronous and ripple counters, ring and Johnson counters.
Computer organisation
- Cache mapping: Tag, index and offset bits, then a reference trace with every hit, miss and LRU or FIFO eviction, plus average access time.
- Pipelining: A 5-stage timing diagram cycle by cycle: data hazards, forwarding, load-use stalls, branch penalties, CPI and speedup.
- Addressing modes: Immediate, direct, indirect, register, indexed, base, relative and auto-increment, on a small machine; plus instruction formats.
- IEEE 754 floating point: Encode and decode half, single and double precision: normalise, bias, round to nearest even, denormals, ∞ and NaN.
- I/O, interrupts and DMA: Polling, interrupts and DMA compared by CPU time, worked out step by step, plus burst and cycle-stealing DMA.
Discrete maths
- Propositional logic: Truth tables built column by column, equivalences, CNF and DNF, rules of inference and quantifiers over a small domain.
- Sets and relations: A relation as a matrix and a digraph: properties, Warshall's closure, equivalence classes, Hasse diagrams and lattices.
- Combinatorics: Permutations, combinations, stars and bars, inclusion-exclusion on a Venn diagram, derangements, Catalan numbers and recurrences.
- Graph theory: Havel-Hakimi, Euler and Hamilton tours, bipartite checks, chromatic number, matchings, Euler's formula and spanning-tree counts.
- Recurrences: Recursion trees drawn level by level, master theorem cases with the reasoning, substitution checks and growth rates compared.
Engineering maths
- Matrices: Gaussian elimination with exact fractions: rank, determinants, inverses, Ax = b, and eigenvalues with eigenvectors.
- Probability: Sample spaces, conditional probability and Bayes with a tree, E[X] and Var(X), and binomial to normal distributions plotted.
- Calculus: Limits by table and L'Hôpital, maxima and minima with a sign chart, Riemann sums closing in on an integral, and the MVT.
- Quantitative aptitude: Percentages, profit, mixtures, work, speed, averages, interest, series, clocks and calendars, solved step by step, then timed sets.
AI engineering
- Tokenisation (BPE): Train byte-pair encoding merge by merge on your own text, then see English, Hindi, code and numbers split into tokens.
- Embeddings: Hand-made word vectors you can read: cosine vs dot product vs distance, neighbours, analogies and semantic search, plotted with PCA.
- Attention: Scaled dot-product attention by hand: Q·Kᵀ, scaling, the causal mask, softmax row by row and two heads, as a heatmap.
- Sampling: Next-token logits through temperature, top-k, top-p and repetition penalty, then a seeded draw, with entropy.
- KV cache: Prefill vs decode step by step: what the KV cache saves, how its memory grows, time to first token and tokens per second.
- Retrieval and RAG: BM25 by hand, dense search, hybrid with Reciprocal Rank Fusion, reranking, chunking strategies and the RAG prompt with citations.
- HNSW vector search: Build a layered small-world graph from random points, then watch a search hop down the layers, against brute force.