Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2023/functional-programming-design-and-analysis-of-algorithms/5/a/ii/solution

Use source , as in the preceding part. The Dijkstra algorithm extracts vertices in the order . Distances after relaxing the outgoing edges of each extracted vertex are
The shortest path to is , with weight ; the direct route to and the route via are both heavier.

New to topics? Read the docs here!