You are given a prices, where prices[i] represents the price of purchasing the
The market provides an offer: if you purchase the prices[i] coins, you are allowed to claim the next
Return the minimum number of coins needed to acquire all the fruits.
Note: You can choose to purchase a fruit even if you are eligible to take it for free, in order to activate its promotional reward.
Constraints:
prices.length
prices[i]
You are given a prices, where prices[i] represents the price of purchasing the
The market provides an offer: if you purchase the prices[i] coins, you are allowed to claim the next
Return the minimum number of coins needed to acquire all the fruits.
Note: You can choose to purchase a fruit even if you are eligible to take it for free, in order to activate its promotional reward.
Constraints:
prices.length
prices[i]