Expedia SDE Interview Question 2022 January | Graph Theory (Bellman-Ford Variant)
Question · Posted Jun 2026
Question 1: Cheapest Flights Within K Stops Problem Statement There are n cities connected by some number of flights. You are given an array flights where flights[i] = [from_i, to_i, price_i] indicates that there is a flight from city from_i to city to_i with cost price_i. You are also given three integers src, dst, and k. Return the cheapest price from src to dst with at most k stops. If there is no such route, return -1. Constraints 1 <= ...
The full answer & interview discussion are available to premium members.
Log in Create a free account