Data Structures & AlgorithmsVery hardICPC regional · Codeforces Div2 D

Problem: Vertices 0–5 with undirected edges 0-1, 1-2, 2-0, 2-3, 3-4, 4-5, 5-3. How many articulation points (cut vertices, whose removal increases the number of connected components) does the graph have?

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

Correct answer: B. 2

A vertex is a cut vertex when deleting it raises the component count. Checking degrees ≥ 2 wrongly accepts vertices on cycles, which do not disconnect anything.

More Coding Interview Problems questions

Exams that ask this topic