Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
45
:
29
Back to Dashboard
Tiered Order Pricing
Hard
A warehouse fulfillment system batches orders to minimize shipping costs. Orders for the same SKU that are placed within 5 minutes (300,000 ms) of each other are combined into a single fulfillment batch. After sorting by timestamp, consecutive orders for the same SKU are merged as long as each adjacent pair is within 300,000 ms of each other.
Each batch is priced using tiered rates. To find the minimum cost for a batch quantity, repeatedly apply the largest available tier that fits the remaining quantity; any leftover units are priced at the 1-unit tier rate for that SKU. Return the total minimum cost across all batches. ...