Data Structures & AlgorithmsHardICPC regional · Product Company SDE

Problem: An undirected graph has vertices 0–5 and edges 0-1, 1-2, 2-0, 2-3, 3-4, 4-5, 5-3. How many edges are bridges (removal increases the number of connected components)?

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

Correct answer: A. 1

An edge is a bridge when no other path joins its endpoints. The edge 2-3 connects the two triangles and is the only bridge, since every other edge lies on a cycle.

More Coding Interview Problems questions

Exams that ask this topic