79284526

Date: 2024-12-16 11:41:30
Score: 0.5
Natty:
Report link

The key concept in Dijkstra's algorithm is that once you visit a node, you never have to visit it again. This is because we always explore the cheapest path first, so the first time we arrive at a node is guaranteed to be the cheapest way to get there.

It's also why we must explore the cheapest path first, and why negative weights (which destroy our assumption) invalidate Dijkstra's algorithm.

Reasons:
  • No code block (0.5):
Posted by: cbreezier