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.
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.
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.