Here is the articulation point detection algorithm:
timer = 0
disc = array of size n, all -1
low = array of size n
isAP = array of size n, all false
function dfs(v, parent):
disc[v] = low[v] = timer
timer = timer + 1
children = 0
for w in adj[v]:
if w == parent:
continue
if disc[w] == -1:
children = children + 1
dfs(w, v)
low[v] = min(low[v], low[w])
if parent != -1 and low[w] >= disc[v]:
isAP[v] = true
else:
low[v] = min(low[v], disc[w])
if parent == -1 and children >= 2:
isAP[v] = true
for v from 0 to n - 1:
if disc[v] == -1:
dfs(v, -1)
A non-root vertex is an articulation point if low[w] >= disc[v] for some child . The root is an articulation point if it has + children.