HTMLify
LeetCode - Final Prices With a Special Discount in a Shop - Python
Views: 407 | Author: abh
1 2 3 4 5 6 7 8 | class Solution: def finalPrices(self, prices: List[int]) -> List[int]: for i in range(len(prices)-1): for j in range(i+1, len(prices)): if prices[i] >= prices[j]: prices[i] -= prices[j] break return prices |