Dijkstra’s Algorithm in Python

Dijkstra’s algorithm is one of the key algorithms we hear about within computer science. It can be slightly less accessible to beginners because you have to know what a weighted, directed graph is. 

The algorithm takes a starting node and outputs minimum length paths to all other nodes. 

I wanted to share my python code for this algorithm, because I think it’s a cool and useful one. Here a thorough explanation, and here is a great visualization.

You can view the code on my github as well!

http://alexhwoods.com/dijkstra/

Advertisements