🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Minimum Spanning Trees: all 10 questions

Quiz: Minimum Spanning Trees · Question 2 of 10

In Kruskal's algorithm, an edge u–v is skipped when:

In Kruskal's algorithm, an edge u–v is skipped when:

  1. A.its weight is larger than the previous edge
  2. B.u and v are already in the same component, so the edge would create a cycle
  3. C.u has already been used by another edge
  4. D.v is a leaf
Answer & explanation

Correct answer: u and v are already in the same component, so the edge would create a cycle

Kruskal only skips edges that would close a cycle; everything else is taken in weight order.

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 →