Math — Dijkstra's Algorithm
Shortest paths from a source node.
Rendering…
Make it your own.
d[v] = \min(d[v],\ d[u] + w(u,v))
\text{greedy: pick the nearest unvisited}
\text{requires non-negative weights}
O((V + E)\log V)\ \text{with a heap}
Shortest paths from a source node.
d[v] = \min(d[v],\ d[u] + w(u,v))
\text{greedy: pick the nearest unvisited}
\text{requires non-negative weights}
O((V + E)\log V)\ \text{with a heap}