Algorithms and Data Structures · Middle · Question 65 of 75
Which algorithm finds a minimum spanning tree by adding the cheapest edges that don't create a cycle?
- 1Topological sort
- ✓Correct answer: Kruskal's algorithm
- 3Dijkstra's algorithm
Explanation
Kruskal sorts edges by weight and uses union-find to skip edges that would connect vertices already in the same component. Dijkstra computes shortest paths, which is a different problem.