← Quiz: Minimum Spanning Trees: all 10 questions
Quiz: Minimum Spanning Trees · Question 5 of 10
Prim's algorithm, at each step, adds:
Prim's algorithm, at each step, adds:
- A.the lightest edge that connects the current tree to a node outside it
- B.the lightest edge anywhere in the graph
- C.the node with the most edges
- D.the edge closest to the start in number of hops
Answer & explanation
Correct answer: the lightest edge that connects the current tree to a node outside it
Prim grows one tree; Kruskal picks the lightest edge anywhere that does not make a cycle.
Can you get the rest right without peeking?
Take the timed Quiz: Minimum Spanning Trees quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →