O( | E | + | V | )
1. perform DFS, storing the vertices in order visited
DFS: a, b, d, e, c, f, g
num low
a 1 1
b 2 1
c 5 5
d 3 1
e 4 1
f 6 5
g 7 5
low[e] = min(num[e], num[a], num[b])
= min(4, 1, 2)
= 1
low[d] = min(num[d], low[e], num[a])
= min(3, 4, 1)
= 1
low[b] = min(num[b], num[d], low[e])
= min(2, 1, 1)
= 1
low[g] = min(num[g], num[c])
= min(7, 5)
= 5
low[f] = min(num[f], low[g])
= min(6, 5)
= 5
low[c] = min(num[c], num[f], low[g])
= min(5, 5, 5)
= 5