Data Structures & AlgorithmsModerateCodeforces Div 2 C · ICPC regional

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

  1. A. 10
  2. B. 19
  3. C. 6
  4. D. 7

Correct answer: D. 7

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic