638 Shopping Offers
638. Shopping Offers
1. Question
Input:
[2,5], [[3,0,5],[1,2,10]], [3,2]
Output:
14
Explanation:
There are two kinds of items, A and B. Their prices are $2 and $5 respectively.
In special offer 1, you can pay $5 for 3A and 0B
In special offer 2, you can pay $10 for 1A and 2B.
You need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A.2. Implementation
3. Time & Space Complexity
Last updated