DraftKings Interview Question

Discount assignment question, four subtasks