grokking-algorithms/chapter9
2024-01-19 17:21:42 +00:00
..
examples add chapter9 exercises 2023-12-19 15:47:26 +00:00
with_heap add some debug logging 2023-12-20 21:40:23 +00:00
with_list_function whitespace 2023-12-20 22:06:29 +00:00
dijkstra1.png add chapter9 exercises 2023-12-19 15:47:26 +00:00
dijkstra2.png add chapter9 exercises 2023-12-19 15:47:26 +00:00
dijkstra3.png add chapter9 exercises 2023-12-19 15:47:26 +00:00
rama.py add chapter9 exercises 2023-12-19 15:47:26 +00:00
README.md add some notes 2024-01-19 17:21:42 +00:00

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.
  • Priority queue + min heap is optimal when compared to a function that operates on a list.