2

我正在开发一个应用程序,我需要从无向图检测循环。我在 c# 中实现了相同但速度很慢。我找到了 Quickgraph Sdk,但找不到任何实现或示例或文档相同的。

如果有人知道 quickgraph 的实施或演练,请告诉我,因为这对我来说非常紧迫。

4

1 回答 1

2

I don't know quickgraph, but finding cycles in an undirected graph should be doable in O(n) by searching depth first and marking each visited node... if you explore a new edge to an already visited node you have a cycle in your graph.

于 2013-04-12T10:50:27.587 回答