Data Structures & AlgorithmsHardICPC regional · algorithm theory

Problem: Which of the following decision problems is NP-complete?

  1. A. Single-source shortest paths
  2. B. Vertex cover (does a cover of size at most k exist?)
  3. C. Minimum spanning tree weight
  4. D. Maximum flow value

Correct answer: B. Vertex cover (does a cover of size at most k exist?)

Vertex cover is one of Karp's NP-complete problems; the other three have polynomial algorithms.

More Coding Interview Problems questions

Exams that ask this topic