Skip to content

Developed code for Dijkstra's Algorithm, an algorithm to find the shortest paths between nodes in a weighted graph, which may represent, for example, road networks

Notifications You must be signed in to change notification settings

hannahgsimon/DijkstrasAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Graph traversal program with menu
1- Author Info
2- Load Graph
3- Traverse Graph
0- Exit Program
Where:
1 prints the program author info.
2 asks the user to enter a file name and loads the graph specified in the file using an adjacency matrix.
3 asks for a starting node and then allows the user to travel around the graph. Informs the user of all neighbors and the cost of traveling to each neighbor, then lets the user pick a neighbor to travel to. As the user traverses the nodes, a total of the costs incurred by the chosen path is kept.
0 exits the program.

When traversing the graph, selecting -1 exits the traversal.
If the user enters -2, the program uses Dijkstra's Algorithm to find the shortest path to all other vertices on the graph and print the paths to the screen.

About

Developed code for Dijkstra's Algorithm, an algorithm to find the shortest paths between nodes in a weighted graph, which may represent, for example, road networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages