Data Structures & AlgorithmsHardCodeforces Div 2 C · ICPC regional

Undirected weighted graph on vertices 0 to 4 with edges: 0–1 (2), 1–2 (6), 0–3 (13), 1–3 (15), 2–3 (5), 0–2 (6), 1–4 (6). 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. 8
  2. B. 6
  3. C. 19
  4. D. 2

Correct answer: B. 6

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic