2 questions
I want to print out the shortest path length using Dyxtra, so could you tell me what the output code is? I know the route, but I don't know how to get the length.
graph = {}graph[start] = {}graph[start][a] = 6graph[start][b] = 2graph[a] = {fin: 1} # graph[a][fin] = 1graph[b] = {a: 3, fin: 5} # graph[b][a] = 3 graph[b][fin] = 5graph[fin] = {}# Hash table that st...
© 2024 OneMinuteCode. All rights reserved.