Skip to main content

One doc tagged with "Shortest Path"

View All Tags

Cheapest Flights Within K Stops

You are also given three integers src, dst, and k, return the cheapest price from src to dst with at most k stops. If there is no such route, return -1.