Swiggy: Shopping cart with checkout and pluggable discount rules
Problem. Design a shopping cart. A user adds items, pays, and has discounts applied. Discounts can work in several different ways, for example different rule types. More features were added if time allowed.
How the round went. The candidate began by clarifying the requirements and constraints, then confirmed their assumptions with the interviewer before designing anything. They modelled the different discount behaviours with the Strategy pattern, so a new discount type can be added without changing the cart or checkout code.
What the interviewer cared about. Most of all, gathering requirements and stating assumptions clearly, then a design that stays extensible as new discount types and features come in. The interviewer was engaged and helpful throughout.
This was the LLD round for a backend SDE-1 role. Earlier rounds covered an online assessment and a DSA round with Spring Boot fundamentals.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.