Home »
MCQs »
Algorithms MCQs
Prim's algorithm starts with an arbitrary vertex and grows the MST by adding the ____ edge that connects a vertex in the MST to a vertex outside the MST.
41. Prim's algorithm starts with an arbitrary vertex and grows the MST by adding the ____ edge that connects a vertex in the MST to a vertex outside the MST.
- Longest
- Shortest
- Heaviest
- Lightest
Answer
The correct answer is: D) Lightest
Explanation
At each step, Prim's algorithm selects the minimum weight edge that connects the MST to a vertex outside the MST.