SwiggySoftware Engineer · Phone ScreenCodemia practiceCompute a Food Order Bill With Capped Coupons and Distance Slabs
Given cart items with price, quantity and packaging charge, an optional coupon (percentage with a cap, or flat, each with a minimum order value), the delivery distance and whether the user is a member, return the full bill breakdown: item total, discount, packaging, GST, delivery fee and grand total.