Data Structures & AlgorithmsVery hardICPC regional · matching

Problem: Which statement about Hopcroft-Karp is correct?

  1. A. It computes maximum bipartite matching in O(E sqrt(V))
  2. B. It is exponential in the number of vertices
  3. C. It works only for complete bipartite graphs
  4. D. It computes minimum vertex cover only

Correct answer: A. It computes maximum bipartite matching in O(E sqrt(V))

Augmenting along a maximal set of shortest paths per phase gives O(sqrt V) phases.

More Coding Interview Problems questions

Exams that ask this topic