Data Structures & AlgorithmsModerateCodeforces Div 2 C · ICPC regional

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

  1. A. 7
  2. B. 15
  3. C. 4
  4. D. 3

Correct answer: C. 4

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic