Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
Airports and flights
The price under each airport is the cheapest found so far
flights[i] = [from, to, price] are one-way flights between airports 0…n−1. Return the cheapest price from src to dst using at most k stops in between, or -1.
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
The price under each airport is the cheapest found so far
E = number of flights. The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. Up to 7 airports and 14 flights, prices from 1 to 1000, no duplicate flights.