Expedia logoExpedia
CodingMembers

Cheapest Flight Itinerary with a Layover Limit

Members only

A travel-flavored graph question: price out the cheapest way between two airports when the number of connections is capped. The cap is what makes it tricky — the obvious shortest-path instinct quietly returns wrong answers unless you rethink what counts as a visited state.

SWE
medium
graph
shortest-path
dijkstra
bellman-ford
heap
Frequency
Single report
Last asked
—
Stage
—

Members get

  • Full problem statement
  • 3 progressive hints
  • Step-by-step approach
  • Full solution with code
  • 3 common pitfalls
  • 6 talking points
  • 5 follow-up questions with answer directions
  • Preparation drills

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...