Graph and grid tools

Graph Algorithm Visualizers

Trace graph traversal, shortest paths, minimum spanning trees, dependency ordering, grid movement, and disjoint-set operations with visual step output.

Use this hub when relationships are the input

These tools model vertices connected by edges, or grid cells connected to neighbours. Start by deciding whether you need reachability, one route, every route, dependency order, or a minimum-cost network.

Choose a graph algorithm by the result you need

Graph algorithms answer different questions. Pick traversal, shortest path, dependency order, or minimum spanning tree before choosing a tool.

Visit reachable nodes

Use BFS or DFS for reachability, traversal order, and connected exploration; use matrix traversal for the same ideas on a grid.

Find a shortest path

Use Dijkstra for non-negative weighted edges, A Star for a heuristic grid route, Bellman Ford for negative edges, or Floyd Warshall for all pairs.

Order dependencies

Use topological sort when directed edges express prerequisites and every dependency must appear before its dependent node.

Connect nodes at minimum cost

Use Kruskal or Prim for a minimum spanning tree, and union find to inspect how components merge.

Compare graph algorithms before choosing one

Edge weights, the number of sources and destinations, and whether the graph is acyclic determine which algorithm fits.

VisualizerBest forImportant constraintTypical time
Graph BFS DFS VisualizerReachability, traversal order, and connected explorationBFS gives unweighted shortest paths; DFS does notO(V + E)
Dijkstra Algorithm VisualizerSingle-source shortest paths with non-negative weightsDo not use it when a reachable edge has a negative weightO((V + E) log V)
Bellman Ford VisualizerShortest paths with negative edges or cycle detectionIt is slower because every edge may be relaxed repeatedlyO(V × E)
A Star Pathfinding VisualizerOne goal-directed route when a useful heuristic is availableA poor heuristic removes much of the search advantageProblem-dependent
Floyd Warshall VisualizerShortest paths between every pair of verticesThe cubic table cost is unsuitable for large sparse graphsO(V³)
Topological Sort VisualizerOrdering prerequisites in a directed acyclic graphA directed cycle means no topological order existsO(V + E)

Traversal and grid search

Explore queues, stacks, visited sets, grid neighbors, and the order in which graph and matrix nodes are processed.

Shortest paths

Compare non-negative weighted search, heuristic pathfinding, negative-edge handling, and all-pairs shortest paths.

Minimum spanning trees and components

See edge sorting, frontier growth, component merging, and disjoint-set operations in connected graph problems.

Graph Algorithm Visualizers FAQ

Which graph visualizer shows BFS and DFS?

Use the Graph BFS DFS Visualizer to compare breadth-first search and depth-first search order on a graph.

Which visualizer should I use for shortest paths?

Use Dijkstra for non-negative weighted graphs, A Star for heuristic grid pathfinding, Bellman Ford for negative edges, and Floyd Warshall for all-pairs shortest paths.

Do the graph visualizers run in the browser?

Yes. The visualizers run as browser tools on RavensMove and are designed for small learning inputs that are easy to inspect.