Recall & Review
beginner
What is a Minimum Spanning Tree (MST)?
A Minimum Spanning Tree is a subset of edges in a connected, weighted graph that connects all vertices together without any cycles and with the minimum possible total edge weight.
Click to reveal answer
beginner
What is the main idea behind Kruskal's Algorithm?
Kruskal's Algorithm builds the MST by sorting all edges by weight and adding the smallest edge to the MST if it does not form a cycle, repeating until all vertices are connected.
Click to reveal answer
intermediate
Why do we use a Disjoint Set (Union-Find) data structure in Kruskal's Algorithm?
The Disjoint Set helps efficiently check if adding an edge will create a cycle by tracking which vertices are in the same connected component.
Click to reveal answer
intermediate
What is the time complexity of Kruskal's Algorithm?
The time complexity is O(E log E), where E is the number of edges, mainly due to sorting the edges. Union-Find operations are almost constant time.
Click to reveal answer
beginner
In Kruskal's Algorithm, what happens if an edge connects two vertices already in the same set?
The edge is skipped to avoid creating a cycle in the MST.
Click to reveal answer
What is the first step in Kruskal's Algorithm?
✗ Incorrect
Kruskal's Algorithm starts by sorting all edges from smallest to largest weight.
Which data structure is commonly used to detect cycles in Kruskal's Algorithm?
✗ Incorrect
Disjoint Set (Union-Find) efficiently tracks connected components to detect cycles.
What does Kruskal's Algorithm guarantee about the resulting tree?
✗ Incorrect
Kruskal's Algorithm finds a tree connecting all vertices with the smallest total edge weight.
If adding an edge creates a cycle, what does Kruskal's Algorithm do?
✗ Incorrect
To keep the MST cycle-free, edges that create cycles are skipped.
What is the main factor affecting Kruskal's Algorithm's running time?
✗ Incorrect
Sorting edges by weight dominates the running time, which is O(E log E).
Explain step-by-step how Kruskal's Algorithm builds a Minimum Spanning Tree.
Think about sorting edges and using sets to avoid cycles.
You got /6 concepts.
Describe how the Disjoint Set (Union-Find) data structure helps in Kruskal's Algorithm.
Focus on cycle detection and set merging.
You got /5 concepts.