我如何检查是否有向图是无环?而且怎么叫算法?我想AP preciate一个参考。
How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference.
我会尝试排序拓扑,如果你不能,那么它有个周期。
I would try to sort the graph topologically, and if you can't, then it has cycles.