Prim’s algorithm is a well-known algorithm for finding minimum spanning trees. The algorithm in the form known today bears striking similarities with Dijkstra’s algorithm.

Get hands-on with 1400+ tech skills courses.