Fundamentals/Shopkeeper Sale
← PrevNext →
Given an array of item prices, on the kth day the shopkeeper discounts each price by the next price in the array that is less than or equal to it (or zero if none exists). Return the array of final prices.