Problem 1631 · Medium

Path With Minimum Effort

Dijkstra where a path’s cost is its largest height step, so the search always extends the cheapest-effort route.

Open the interactive visualisation