Skip to content

Latest commit

 

History

History

Assignment2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Assignment 2 - Dijkstra

Tasks

  1. Modify the graph data structure shown in tutorial 3 to accommodate graphs with weighted edges. Then build the graph shown in the figure above.
  2. Implement Dijkstra’s algorithm to find the shortest path between source node a and destination node f. You may use the inbuilt priority queue data structure provided by Python: https://docs.python.org/3/library/heapq.html. If you want, you can implement the Priority Queue data structure on your own, but, it is optional.

Instructions for execution

  1. change to current working directory to Assignment2
cd Assignment2
  1. Run the python file
python dijkstra.py