Find the fastest routes through the city with Dijkstra's algorithm, handle road closures, and plan the best round trip through a courier's stops.
Fastest route
One-way roads with travel times, and Dijkstra's algorithm with the route reconstructed from predecessors.
Closures and round trips
Close and reopen roads, then find the shortest round trip through up to eight stops.
More than eight stops
Busy days have 15 stops. Replace brute force with dynamic programming over subsets.
Represent a road network as a graph, find shortest routes with breadth-first search and Dijkstra's algorithm, rebuild the route from predecessors, and search every order of stops.