System Design · Instacart · Medium
Design a pricing routine that receives a basket of transaction lines and the currently available promotions, then returns the lowest total price that is legally attainable. The promotion types are percentage-off discounts and buy-x-get-y deals. The transaction-line schema, promotion eligibility, whether promotions may be combined, any reuse limits, how free units are selected when prices differ, and how rounding is applied are deliberately not specified. You must decide and…
Checking your access…