9 lines
157 B
Plaintext
9 lines
157 B
Plaintext
|
dijkstra (G, w, s):
|
|||
|
source(G,s)
|
|||
|
S <- null
|
|||
|
Q <- V[G]
|
|||
|
while Q!=null:
|
|||
|
u <- Extract_min(Q)
|
|||
|
s <- S + u
|
|||
|
<09><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> v <20><> Adj[u]:
|
|||
|
relax(u, v, w)
|