← Quiz: Minimum Spanning Trees: all 10 questions
Quiz: Minimum Spanning Trees · Question 4 of 10
Which data structure makes Kruskal's cycle check fast?
Which data structure makes Kruskal's cycle check fast?
- A.A stack
- B.A min-heap
- C.A trie
- D.Union-Find (disjoint set union)
Answer & explanation
Correct answer: Union-Find (disjoint set union)
find(u) == find(v) tells whether u and v are already connected, in nearly constant time.
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 →