Data Structures & AlgorithmsVery hardICPC regional · graph connectivity
Problem: Which problem asks for the minimum number of edges to add to make a graph 2-edge-connected?
- A. Bridge-tree leaf pairing (ceil of leaves / 2 for the bridge tree)
- B. Shortest path
- C. Assignment problem
- D. Topological sort
Correct answer: A. Bridge-tree leaf pairing (ceil of leaves / 2 for the bridge tree)
Adding edges between leaves of the bridge tree is optimal, so the answer is about half the number of leaves.
More Coding Interview Problems questions
- Problem: What does 'lazy propagation' in a segment tree guarantee for a range-add update?
- Problem: Which result is the basis of Mo's algorithm's complexity analysis?
- Problem: What is the expected number of comparisons of randomised quicksort on n distinct elements?
- Problem: Which property does the 'exchange argument' prove for an optimal greedy algorithm?
- Problem: Which structure supports both insertion and 'k-th smallest' queries in O(log n) each?
- Problem: What is the complexity of the Edmonds-Karp algorithm in terms of V and E?