NeetCode #639LC-787MediumAdvanced GraphsNC 150NC 250
← Back to All Problems

#639 · #787 · Cheapest Flights Within K Stops(K 站中转内最便宜的航班)

📌 Problem Statement & Constraints

You are given n cities, flights where flights[i] = [from, to, price], and integers src, dst and k. Return the cheapest price from src to dst with at most k stops, or -1. Constraints: 1 <= n <= 100, 0 <= flights.length <= n * (n - 1) / 2, 0 <= k < n, prices are positive.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!