Data Structures & AlgorithmsHardCodeforces Div 2 · ICPC regional

Connected undirected weighted graph on vertices A, B, C, D, E, F with edges A–B (14), A–C (14), A–D (6), A–E (3), B–C (16), B–D (20), B–E (18), E–F (6). What is the total weight of a maximum spanning tree (a spanning tree with the largest possible total weight)?

  1. A. 43
  2. B. 54
  3. C. 74
  4. D. 97

Correct answer: C. 74

Kruskal run on edges in decreasing weight gives 74. 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