任何人都可以向我详细解释为什么以及如何在无向图中检测循环的 DFS 上限是 O(|V|) 吗?
algorithm graph depth-first-search
algorithm ×1
depth-first-search ×1
graph ×1