Data Structures & AlgorithmsVery hardICPC regional · graph cuts
Problem: Which deterministic algorithm finds the global minimum cut of an undirected weighted graph with V vertices in O(V^3) time?
- A. Stoer-Wagner
- B. Karger's random contraction
- C. Edmonds-Karp
- D. Kruskal's algorithm
Correct answer: A. Stoer-Wagner
Stoer-Wagner repeatedly computes a minimum cut-of-the-phase using maximum adjacency orderings, giving an O(V^3) deterministic bound.
More Coding Interview Problems questions
- Count the non-empty subarrays of a = [3, -1, 4, -1, 5, -9, 2, 6] whose sum is divisible by 5, using prefix sums taken modulo 5. python…
- Items (weight, value) are (5,10), (4,7), (6,12), (3,4) and the knapsack capacity is 10. Each item may be taken at most once. Run the exact…
- Binary string s = "1101001110001011". Find the length of the longest contiguous substring that contains equally many 0s and 1s. python…
- Intervals (start, end) are compatible when one ends at or before the other starts. Run the earliest-finish greedy on the list below and…
- Coins of denominations 1, 3 and 4 are available with unlimited supply. For the amount 6, run the DP that finds the minimum number of coins…
- Array a = [1, 3, 2, 3, 1, 4, 5, 2]. Subsequences are chosen by index (positions may repeat values). Count the strictly increasing…