Problem 2714 · Medium

Find Shortest Path with K Hops

Settle (node, free hops used) states in order of cost, so each edge can be paid for or taken free without losing the best route.

Open the interactive visualisation