Implementation of Dijkstra algorithm (Programming question 5) started