mirror of
https://github.com/onyx-and-iris/grokking-algorithms.git
synced 2024-11-15 17:30:52 +00:00
|
||
---|---|---|
.. | ||
with_heap | ||
with_list_function | ||
dijkstra1.png | ||
dijkstra2.png | ||
dijkstra3.png | ||
rama.py | ||
README.md |
Shortest path for weighted graph (cost associated edges)
- Dijkstra's algorithm works when all weights are non-negative
- If there are negative weights use Bellman-Ford.
- The book demonstrates a function that operates on a list. Priority queue + min heap added for completeness.