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?

  1. A. Kruskal's algorithm
  2. B. Hungarian algorithm
  3. C. Dinic's algorithm
  4. 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

Exams that ask this topic