Problem 3650 · Medium

Minimum Cost Path with Edge Reversals

Add a reversed arc with twice the cost next to every directed edge, then run Dijkstra on the enlarged graph.

Open the interactive visualisation