Data Structures & AlgorithmsHardProduct-company MCQ pattern

An undirected graph has edges 1–2, 2–3, 3–1, 3–4, 4–5, 5–6, 6–4, 6–7. How many articulation points (vertices whose removal disconnects the graph) does it have?

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

Correct answer: D. 3

Removing 3 cuts {1, 2} off; removing 4 cuts {1, 2, 3} from {5, 6, 7}; removing 6 isolates 7. Vertices inside the triangles (1, 2, 5) and the leaf 7 are not cut vertices. Missing 6 because it lies on a cycle gives 2.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic