Dijkstra's algorithm for undirected graphs added