如何检查有向图是否是无环的?算法是如何调用的?我将不胜感激。
最佳答案
我会尝试 sort the graph topologically ,如果不能,则它有循环。
关于algorithm - 如何检查有向图是否是无环的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/583876/
如何检查有向图是否是无环的?算法是如何调用的?我将不胜感激。
最佳答案
我会尝试 sort the graph topologically ,如果不能,则它有循环。
关于algorithm - 如何检查有向图是否是无环的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/583876/