Back to QuestionsPractice with This Question
Cheapest Flights Within K Stops
25.2K views•Asked at Amazon•
Medium
Question Explain
Given $n$ cities and flights, find the cheapest price from a source to a destination with at most $k$ stops. Use a modification of BFS or Bellman-Ford (or Dijkstra with a stop counter).
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.