Dijkstra algorithm and input graph