Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 41s1 days 16 hours 1 minutes 41 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 41s1 days 16 hours 1 minutes 41 seconds.

Sign in to watch this lesson
Advanced - Graphs · 4:58
A bridge is an edge, and an articulation point a vertex, whose removal disconnects a graph. One depth-first search finds them all in O(n + m): it records each vertex's entry time tin and its low-link value low, the smallest entry time its subtree can reach with one back edge. A tree edge v-to is a bridge when low[to] > tin[v], and v is a cut vertex when some child has low[to] >= tin[v], with a separate rule for the root.