The program then computes the shortest path from the start to the finish using Dijkstra's algorithm