Question DSA-GRDY-0003
EasyWhich algorithm builds a minimum spanning tree greedily by adding the cheapest edge that doesn't form a cycle?
- A.
Floyd–Warshall
- B.
Kruskal's algorithm
- C.
Show answer and explanation
Answer: B
Prim's algorithm is another greedy MST algorithm, growing one tree from a start vertex.