Adding code for Dijkstra's Algorithm