Data Structures & AlgorithmsHardICPC regional · algorithm theory
Problem: Which algorithm solves the minimum-cost perfect assignment problem (bipartite, n x n cost matrix) in O(n^3) time?
- A. Kruskal's algorithm
- B. Hungarian algorithm
- C. Dinic's algorithm
- D. Tarjan's SCC algorithm
Correct answer: B. Hungarian algorithm
The Hungarian method maintains dual potentials and augments along zero-reduced-cost paths, giving O(n^3). The other three solve different problems.
More Coding Interview Problems questions
- Problem: What is the complexity of Dinic's algorithm on a unit-capacity bipartite matching graph with V vertices and E edges?
- 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?