我知道可以使用 DFS 和 BFS 检测直接图中的循环。我想知道我们是否可以使用Union-Find检测有向图中的循环?
graph graph-algorithm data-structures union-find cycle-detection
cycle-detection ×1
data-structures ×1
graph ×1
graph-algorithm ×1
union-find ×1