Data Structures & AlgorithmsHardICPC regional · graph theory

Problem: What is the time complexity of finding the articulation points and bridges together with one DFS?

  1. A. O(V^2)
  2. B. O(E log E)
  3. C. O(E^2)
  4. D. O(V + E)

Correct answer: D. O(V + E)

A single DFS computes discovery times and low values, which identify both bridges and articulation points in linear time.

More Coding Interview Problems questions

Exams that ask this topic