Currently, we have visualizations for the following data structures, algorithms and systems:
Algorithms & Data Structures
Basics
Recursion
Indexing
Sorting
Heaps
Graphs
Dynamic Programming
Strings & Greedy
Geometry
Systems
Databases
Distributed Systems
Software Design
Networking
Web & Security
Servers & Event Loops
Operating Systems
Concurrency
Computer Architecture
Java & the JVM
Machine Learning
Algorithms & Data Structures
Basics
- 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
- Binary and Linear Search (of sorted list)
- Binary Search Trees
- AVL Trees (Balanced binary search trees)
- Red-Black Trees
- AVL vs Red-Black Tree (side by side)
- Splay Trees
- Open Hash Tables (Closed Addressing)
- Closed Hash Tables (Open Addressing)
- Closed Hash Tables, using buckets
- 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)
- Ternary Search Tree (Trie with BST of children)
- B Trees
- B+ Trees
Sorting
- Comparison Sorting
- Bubble, Selection, Insertion, Shell, Merge and Quick Sort
- Quick Sort vs Merge Sort (comparisons and memory, side by side)
- Sorting Race (two sorts side by side: comparisons, writes, worst cases, stability)
- 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
- Connected Components
- Strongly Connected Components (Tarjan)
- 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 (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
Dynamic Programming
String & Greedy Algorithms
Systems
Databases & Storage
- B+ Tree as a Database Index (heap file, RIDs, range scans)
- LSM Tree vs B+ Tree (write, read and space amplification)
- 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 MongoDB Runs a Command (find, insertOne, updateOne, deleteOne: WiredTiger cache, update chains, journal, oplog, write concern, rollback)
- 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)
- Write-Ahead Logging and ARIES Crash Recovery (WAL rules, steal / no-force, checkpoints, analysis, redo, undo, CLRs)
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)
- 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)
- Saga vs Two-Phase Commit (side by side: locks, blocking, compensation, isolation)
- How Kafka Moves a Message (producer batching, acks, replication, ISR, consumer groups)
- Kafka Consumer Groups: Rebalancing, Duplicates and Exactly-Once (range vs cooperative-sticky, static membership, zombies, idempotent producer, transactions)
- 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)
- Cache Strategies Side by Side (cache-aside, write-through, write-behind, refresh-ahead, TTL, stale reads, coalescing, lost writes, cold cache)
- Latency vs Throughput (queueing, throughput ceiling, utilization, p50 vs p99 tail latency, Little's Law, batching, 503 back-pressure, hockey-stick curve)
- The Life of a Kubernetes Pod (scheduler, kubelet, init containers, probes, phases, CrashLoopBackOff, ImagePullBackOff, OOMKilled, SIGTERM, eviction, Jobs)
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)
Networking
- Internet Protocol Layers (OSI vs TCP/IP, encapsulation, Ethernet, ARP, IP, TTL, NAT, MTU, fragmentation, ICMP, traceroute)
- How NAT Shares One Public Address (SNAT, conntrack table, port preservation, port forwarding, timeouts, full cone vs symmetric, STUN, hole punching, hairpin)
- The Life of an HTTP Request in Kubernetes (pod, veth, cni0, Service, kube-proxy, iptables DNAT, conntrack, VXLAN, NodePort, Ingress, egress)
- How a DNS Name Is Resolved (stub, recursive resolver, root, TLD, authoritative, caching, TTL)
- TCP vs UDP (handshake, ACKs, retransmission, head-of-line blocking, byte stream vs datagrams, flow control, connection states)
- 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)
- How an HTTPS Connection Is Established (TLS 1.3 handshake, certificates, keys)
- HTTP/1.1 vs HTTP/2 vs HTTP/3 (connections, multiplexing, HPACK, head-of-line blocking, QUIC)
Web & Security
- How Browser Cookies Work (Set-Cookie, Domain, Path, Secure, HttpOnly, SameSite, CSRF, XSS, third-party tracking)
- How OAuth 2.0 Works (authorization code, PKCE, state, access and refresh tokens, scopes, OpenID Connect, device grant)
- How a Digital Signature Works (RSA keys, hash, sign, verify, certificates, forgery)
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)
- Linux epoll (interest list, ready list, level vs edge triggered)
- The Node.js Event Loop (call stack, process.nextTick, promise microtasks, libuv phases, poll, setImmediate, thread pool, blocking)
- How Redis Serves Many Connections with One Thread (event loop, epoll, querybuf, serial execution, pipelining, slow commands, io-threads)
Operating Systems
- How a C Program Is Compiled, Linked, Loaded and Started (preprocessor, cc1, as, ld, object files, relocations, static vs dynamic, PLT/GOT, ld.so)
- 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)
- Linux Context Switch (schedule(), switch_mm, switch_to, pt_regs, CR3 and TLB)
- 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 Virtual Memory (page table walk, TLB, page faults, copy-on-write, huge pages)
- Paging and Page Replacement (address split, TLB, page faults, FIFO / clock / LRU, Belady, swap, copy-on-write)
- Direct Memory Access: How a NIC Moves Packets (PIO vs DMA, descriptor rings, NAPI, IOMMU, cache coherency, bounce buffers)
- The Buddy Allocator (free_area lists, split, buddy merge with XOR, fragmentation, compaction)
- 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)
- 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)
- Readers–Writer Lock (shared reads, exclusive writes, writer starvation, prefer readers vs prefer writers)
- Semaphore (sem_wait, sem_post, pool of N permits, signal between threads, no owner)
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 and Counters (SR latch, D latch, master–slave flip-flop, setup and hold time, metastability, maximum clock frequency)
- 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)
- Combinational Logic: Gates, Adders, Muxes and the ALU (truth tables, full adder, ripple carry, overflow, glitches, decoder, gate delays)
- 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)
- 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)
- 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)
- 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)
- Superscalar and Out-of-Order Execution with Register Renaming (RAW, WAR, WAW, scoreboard, rename table, free list, reorder buffer, IPC, speculation, squash)
- How a CPU Cache Finds, Misses and Replaces (direct-mapped vs set-associative vs fully associative, LRU, write-back, AMAT)
- 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)
Java & the JVM
- 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)
- Java Garbage Collectors: Parallel GC, G1, ZGC (generations, regions, concurrent marking, coloured pointers)
- Stack vs Heap in Java (JVM frames, locals and operand stack, TLAB bump allocation, object headers, pass by value, escape analysis, StackOverflowError, OutOfMemoryError)
- 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)