Cheapest Flights Within K Stops
Asked at Apple · Coding Questions · Difficulty: Medium · Last asked Apr 25, 2026
There are `n` cities, numbered `0` to `n - 1`, connected by one-way flights. Find the cheapest way to travel from a source city to a destination city when the number of stops is limited.
Loading the problem…
More Apple interview questions
- LLM conceptual questions
- Implement a Two-Hidden-Layer MLP with Backpropagation in NumPy
- Compare PPO, DPO, and GRPO
- Implement a Vision Transformer (ViT) from Scratch
- Sample from a Gaussian Distribution Using Only Uniform Sampling
- Diagnose a CTR Drop After a Ranking Model Launch