Graph Algorithms Visualiser

A graph algorithm visualizer: BFS, DFS, Dijkstra, A*, Bellman–Ford, Kruskal, Prim and more, stepped one edge at a time on diagrams and a paintable grid.

A frontend app built by Ananda Rizki. More of them at Labs.

Labs — by Ananda Rizki

Graph Algorithms Visualiser

Simulator

Ten graph algorithms across three drawings, because a graph algorithm's lesson lives in a different picture depending on what it does: a node-link diagram for the traversals and the spanning trees, a paintable grid for pathfinding, and a parent-pointer forest for union–find, which is a picture of bookkeeping rather than of any graph. Node positions are authored by hand rather than produced by a force simulation, so every frame draws identical points and stepping backwards lands on a pixel-identical picture. The grid is where A* earns its keep and where it does not: it explores 103 cells against Dijkstra's 218 on the rooms maze for the same 24-step route, and 201 against 227 on a comb maze where the route doubles back and the heuristic is simply wrong. Kruskal draws the union–find forest underneath the graph, so accepting an edge and merging two trees read as one event, and it builds the same tree Prim does in a completely different order.

Built with
  • react
  • tailwind
Related

Built by Ananda Rizki, a software engineer and designer, one of the small web apps he writes for fun.

Explore more apps on Labs