Data Structures & AlgorithmsModerateWipro NLTH · Graphs

A connected undirected graph has 9 vertices and 14 edges. What is the minimum number of edges that must be removed to turn it into a spanning tree?

  1. A. 5
  2. B. 7
  3. C. 6
  4. D. 8

Correct answer: C. 6

A spanning tree of 9 vertices has 8 edges, so 14 - 8 = 6 edges must go.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic