时间复杂度: O(n^2)
另一个例子 (用最短路径遍历所有可访问的节点):
1--->4--->5--->2--->3
Dijkstra 算法的缺点 (May not work in case of negative edges):
LINK: https://www.youtube.com/watch?v=XB4MIexjvY0
2022-12-02 13:38:51
时间复杂度: O(n^2)
另一个例子 (用最短路径遍历所有可访问的节点):
1--->4--->5--->2--->3
Dijkstra 算法的缺点 (May not work in case of negative edges):
LINK: https://www.youtube.com/watch?v=XB4MIexjvY0