Adding dijkstra's alogrithm.