Floyd-Warshall All-Pairs Shortest Paths (2D)
2D Floyd-Warshall lab: the real O(n³) triple-nested-loop dynamic-programming relaxation running step by step over a weighted graph, with a live distance-matrix heatmap and click-to-query shortest-path reconstruction via the next-hop matrix.
This 2D companion runs the unmodified Floyd-Warshall dynamic-programming recurrence — the real O(n³) triple loop over pivot k, source i and target j — against a small weighted directed graph, advancing one relaxation test at a time so each dist[i][j] = min(dist[i][j], dist[i][k]+dist[k][j]) comparison is visible as it happens. A live distance-matrix heatmap shows exactly which cell improves at each step, and clicking any two nodes reconstructs their actual shortest path by walking the next-hop matrix built alongside the distances, turning the algorithm's textbook pseudocode into something you watch run.
2D Floyd-Warshall lab: the real O(n³) triple-nested-loop dynamic-programming relaxation running step by step over a weighted graph, with a live distance-matrix heatmap and click-to-query shortest-path reconstruction via the next-hop matrix.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install