假设我们使用 Dijkstra 算法,现在我们知道源节点与图中每个节点之间的最短距离。我应该怎么做才能知道每个距离访问了哪些节点?
algorithm graph dijkstra
algorithm ×1
dijkstra ×1
graph ×1