Given flights (from, to, price) between n cities, find the cheapest price from src to dst using at most k stops (so at most k + 1 flights), or -1.
Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.
Start 7-day free trial