🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Minimum Spanning Trees: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. A connected graph has 8 nodes. How many edges does any spanning tree of it have?
  2. Q2. In Kruskal's algorithm, an edge u–v is skipped when:
  3. Q3. What does this print? (code)
  4. Q4. Which data structure makes Kruskal's cycle check fast?
  5. Q5. Prim's algorithm, at each step, adds:
  6. Q6. What does this print? (code)
  7. Q7. Why does an MST never contain a cycle?
  8. Q8. A graph has several edges with equal weights. Which statement is true?
  9. Q9. What is the time complexity of Kruskal's algorithm?
  10. Q10. Which problem is solved by a minimum spanning tree?