Skip to content

andela-sjames/dijkstra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dijkstra

Let's implement the Dijkstra Algorithm.

Inspired by this lesson: https://www.youtube.com/watch?v=pSqmAO-m7Lk

Distance table: Example usecase

Nodes/Vertices 0 1 2 3 4
Distance from node 0 3 1 4 7

Example Weighted Graph

Directed Acyclic Graph

Adjacency list

Adjacency List

Result of Dijkstra shortest path

dijkstra

Result

dijkstra git:(master) go run main.go
Distance array:  [0 3 1 4 7]
Shortest Path:  [2 1 3 4]
Shortest Distance:  7

About

Let's implement the Dijkstra Algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages