What turns a choice into an optimization problem, and why is the knapsack easy with gold dust but hard with gold bars?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
You are travelling from New York to Boston. Each trip in trips has its travel time in minutes, its cost in dollars, and its arrival time as an hour of the day (16.5 is 4:30 PM). A trip is allowed only if it costs at most budget and arrives strictly before deadline. Build the list of the allowed trips' mode names, in the order they appear in trips, and assign it to feasible.