Data Structures & AlgorithmsVery hardCodeforces Div 2 C · ICPC regional

Undirected weighted graph on vertices 0 to 7 with edges: 1–2 (6), 5–6 (1), 1–5 (4), 6–7 (7), 4–7 (11), 3–4 (10), 2–7 (10), 2–6 (13), 4–6 (1), 0–4 (5), 1–7 (12). Over all paths from 0 to 7, what is the smallest possible value of the heaviest edge on the path (the bottleneck or minimax path weight)?

  1. A. 7
  2. B. 13
  3. C. 34
  4. D. 5

Correct answer: A. 7

Adding edges in increasing weight until 0 and 7 become connected gives bottleneck 7. The minimum total path weight (13), the MST weight (34) and the lightest edge at 0 (5) answer different questions.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic