Cheapest Flights Within K Stops
Medium
Graphs
Given directed flights (from, to, price), find the cheapest price from src to dst with at most k stops. Print -1 if no route exists.
Constraints
1 <= n <= 100 0 <= m <= n * (n - 1) / 2 0 <= k < n
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.