mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-12-08 19:06:00 +00:00
Add Dijkstra algorithm illustrations and explanations
This commit is contained in:
parent
a88971df9e
commit
e2ed5cc3f5
@ -83,6 +83,10 @@ If the node that we're visiting (in this case the node `C`) is already in the qu
|
||||
|
||||
Now we now the shortest distances to ech node from the start node `A`. In practice, during the distance calculations we also record the the `previousVertices` for each node to be able to show the exact sequence of nodes that forms the shortest path.
|
||||
|
||||
## Implementation example
|
||||
|
||||
- [dijkstra.js](./dijkstra.js)
|
||||
|
||||
## References
|
||||
|
||||
- [Wikipedia](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user