Data Structures & AlgorithmsHardCodeforces Div 2 · ICPC regional
Undirected weighted graph on vertices A, B, C, D, E, F with edges A–B (4), A–C (5), A–D (6), C–D (5), C–E (7), D–E (5), D–F (5), E–F (6). Over all paths from F to B, minimise the largest single edge weight used on the path. What is that minimum possible largest edge weight?
- A. 5
- B. 6
- C. 15
- D. 7
Correct answer: A. 5
The minimax (bottleneck) value is 5, which equals the largest edge on the MST path between the two vertices. The shortest-path bottleneck is 6, so minimising path length is not the same as minimising the largest edge.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- Array [13, 15, 17, 14, 6, 23, 3] is turned into a min-heap in place with bottom-up heapify: for i from ⌊n/2⌋−1 down to 0, sift the element…
- Keys [12, 24, 3, 18, 30, 33, 7, 16, 4] are inserted, in this order, into an empty AVL tree using the standard rebalancing (left, right…
- Distinct keys [13, 24, 18, 4, 20] are inserted, in the order given by the sequence [18, 20, 4, 24, 13], into an empty binary search tree…
- Distinct words ['baa', 'c', 'b', 'bac', 'bba', 'cbbc'] are inserted into an empty trie (one node per character, shared prefixes sharing…
- Directed graph on vertices A, B, C, D, E, F with edges E→D, A→D, F→C, E→C, A→E, B→C, A→F, D→A. How many strongly connected components does…
- Strings a = "bbbab" and b = "cccbb". The edit distance allows insert, delete and substitute, each costing 1 (the standard Levenshtein…