Data Structures & AlgorithmsVery hardICPC regional · algorithm theory
Problem: What is the complexity of Dinic's algorithm on a unit-capacity bipartite matching graph with V vertices and E edges?
- A. O(V^2)
- B. O(E log V)
- C. O(E sqrt(V))
- D. O(V E^2)
Correct answer: C. O(E sqrt(V))
Unit capacities make Dinic run in O(E sqrt(V)) (Hopcroft-Karp bound), which is the standard matching bound.
More Coding Interview Problems questions
- Problem: In Bellman-Ford, which statement about early termination is correct?
- Problem: What is the time complexity of Prim's algorithm on a graph stored as an adjacency matrix with V vertices?
- Problem: By the Sprague-Grundy theorem, what is the Grundy value of a sum of independent impartial games?
- Problem: What is the minimum number of comparisons in the worst case to find both the maximum and the minimum of n = 10 distinct elements…
- Problem: What is the information-theoretic lower bound on comparisons (in the worst case) for sorting 5 distinct elements?
- Problem: Which of the following decision problems is NP-complete?