Note: This algorithm only deals with undirected graphs. Directed graphs require a small adjustment.
In a DFS, if a node v was visited as an adjacent node of u, we call v the child of u and call u the parent of v. These parent-child relationships form a directed tree, which is called the DFS tree. Edges part of the DFS tree are called tree edges, while edges (u, v) that aren't are
Additionally, for all u, we store stamp[u], the timestamp of when the node was visited. We also store low[u], the lowlink of u, which is the smallest time stamp achievable by starting from u, following any number of tree edges, followed by at most one back edge.
Tarjan's Lowlink Algorithm computes low[u] for each u in linear time using
the following logic:
Initialize time = 0. Inside the DFS call of node u,
A node is cut vertex or a articulation point if removing it disconnects the graph. This happens iff either
An edge (u, v) is a bridge if removing it disconnects the graph. This happens iff either