The problem, in one line. Given priced one-way flights, find the cheapest trip from one city to another that makes at most k stops in between, or -1 if none exists. LeetCode 787.
The tell. Cheapest route, plus a hard cap on how many links the route may use. A cap on the count of links means the count itself has to be part of the state, so you grow the answer one flight at a time.