小编SHA*_*LLI的帖子

我们可以使用 Union-Find 数据结构检测有向图中的循环吗?

我知道可以使用 DFS 和 BFS 检测直接图中的循环。我想知道我们是否可以使用Union-Find检测有向图中的循环?

  • 如果是,那么如何?和
  • 如果我们不能,那为什么?

graph graph-algorithm data-structures union-find cycle-detection

11
推荐指数
2
解决办法
3618
查看次数