Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

Prim's algorithm

Also written: Prim

Another way to build a minimum spanning tree: grow a single tree outward from one starting place, using a heap. It gives the same kind of result as Kruskal's algorithm.

Where the book teaches it

Related terms

Minimum spanning treeKruskal's algorithmMin-heap