Data Structures & Algorithms using JavaScript Course
Data Structures & Algorithms using JavaScript
/
Expert

Prim Algorithm

Definition

Another Greedy algorithm for finding the MST. Starts from a single node and expands by picking the minimum weight edge connecting the MST to a non-MST node using a Priority Queue.

Explain Like I'm New

Starting at one city, and always laying internet cable to the closest un-connected city.

Interactive Coding Challenges

Describe the fundamental approach for Prim.

Solution Code

Loading...
Console output will appear here...