Data Structures & AlgorithmsHardGATE CS · ICPC regional

Connected undirected weighted graph on vertices A, B, C, D, E, F with edges A–D (5), B–D (7), B–F (13), C–D (11), D–E (11), D–F (12), E–F (4). What is the total weight of a maximum spanning tree (a spanning tree with the largest possible total weight)?

  1. A. 52
  2. B. 38
  3. C. 63
  4. D. 25

Correct answer: A. 52

Kruskal run on edges in decreasing weight gives 52. Running the usual ascending order returns the minimum tree, which is the trap.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic