判环求环总结

· · 个人记录

一、无向图

(1)判环

1、topsort

2、并查集

(2)求(最小)环

1、dfs

二、有向

(1)判环

1、topsort

(2)求(最小)环

1、dfs