Compute discounted prices in a queue | Plaid Coding Question