/Python/Def Dijsktra(graph,source): dist = [0]*5 dist[0] = source v = 1 unvisited = {place: None for place in graph.keys()} visited = {} current = source currentDistance = 0 unvisited[current] = currentDistance
Def Dijsktra(graph,source): dist = [0]*5 dist[0] = source v = 1 unvisited = {place: None for place in graph.keys()} visited = {} current = source currentDistance = 0 unvisited[current] = currentDistance
Def Dijsktra(graph,source): dist = [0]*5 dist[0] = source v = 1 unvisited = {place: None for place in graph.keys()} visited = {} current = source currentDistance = 0 unvisited[current] = currentDistance
0
Source: stackoverflow.com
- 1 vote212 views1 answer
- 15 votes212 views3 answers
- 11 votes255 views2 answers
- -1 vote251 views2 answers
- 0 vote228 views1 answer
- 0 vote218 views1 answer
- 39 votes233 views5 answers
- 0 vote202 views1 answer
- 0 vote206 views1 answer
- 10 votes220 views6 answers