Graphs

Prim

Builds a minimum spanning tree by growing it from one vertex.

Learn with an interactive visualization

Category: Graphs. Complexity: O(V²) with an adjacency matrix.

Builds a minimum spanning tree by growing it from one vertex. Interactive visualization, Java and C++ code, operations, complexity, and a complete…