Side-by-side animated comparison of adjacency matrix A[i][j] and adjacency list Adj[v]. The animation alternates between (1) checking whether an edge exists (single matrix cell probe vs scanning a vertex’s neighbor list) and (2) iterating neighbors (scanning an entire matrix row vs walking just the adjacency-list entries). A bottom bar morphs graph density to show the Θ(n²) vs Θ(n+m) space tradeoff.
Pure Canvas2D, green-on-black blocky layout with snapped coordinates. Uses a fixed 6-node example graph; focus vertex cycles over time. Animation toggles every 2s between edge-check and neighbor-iteration modes. Density bar uses a sinusoid to vary m and compares normalized space for n² vs n+m.