Edwin Guo's Blog home

Tarjan

Tarjan算法,计算强联通图,缩点

思路:DFS结合栈次序

void tarjan(u) { dfn[u]=low[u]=++index; }

Fork me on GitHub