Data Structures & AlgorithmsHardICPC regional · Product Company SDE

Problem: Maximum bipartite matching is computed for left side {A, B, C, D} and right side {1, 2, 3, 4} with allowed pairs: A–1, A–2, B–2, B–3, C–1, C–3, D–3, D–4. How many left vertices can be matched in a maximum matching?

  1. A. 4
  2. B. 5
  3. C. 3
  4. D. 6

Correct answer: A. 4

Kuhn's augmenting-path algorithm finds the maximum matching size. Greedily matching each left vertex to its first free neighbour can leave an augmenting path unexplored.

More Coding Interview Problems questions

Exams that ask this topic