Find the shortest path using Dijkstra algorithm