Files
onyx-and-iris 4cd7bb7d18 reorganise directories
upd chapter_01/binary.py
2025-03-26 01:27:35 +00:00
..
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +00:00
2025-03-26 01:27:35 +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.
  • The book demonstrates a function that operates on a list. Priority queue + min heap added for completeness.