Data Structures & AlgorithmsVery hardCodeforces Div 2 C · ICPC regional

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

Correct answer: B. 5

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic