Shopping Cart with Promotions (OOD)

Asked at DoorDash · Coding Questions · Difficulty: Medium · Last asked Dec 7, 2025

OOD Code Craft round. A shopping cart contains items (each with a name and price) plus a fixed shipping fee. A list of promotions applies either a percentage discount (does NOT apply to shipping) or a fixed-dollar discount (applies to items + shipping, cannot reduce total below 0).

Loading the problem…