How to improve Dijkstra algorithm for single source single-target shortest path?

1k Views Asked by At

what improvement can be made in given image dijkstra algorithm to improve Dijkstra algorithm for single source single-target shortest path?

https://i.stack.imgur.com/H5ZW6.png

1

There are 1 best solutions below

0
On

Improvement can be made in this way:

when you visit a node again and no node weight is updating. then one can say there is no need traverse all the node. you can stop the traversing before visiting all the nodes in loop.