Zepto: Coupon types schema plus frequency-weighted coupon picks per minute
Problem. A combined LLD and HLD round on a coupon service, in two parts.
Part 1. Design the database schema and the system for several coupon types: percentage off, flat amount off, other discounts, and cashback. The candidate said the interviewer was not fully convinced by their model, so expect to defend how different coupon types share or split tables.
Part 2. Each coupon has a configured frequency. In every one-minute window, the system must pick coupons at random, in proportion to those frequencies. Design how the selection works.
Candidate's direction for part 2. An asynchronous job that generates the coupon ids for each window ahead of time and then matches them to requests. The interviewer was satisfied with this.
Context. The candidate had 4+ years of experience. The loop also included a DSA round (a two-pointer area problem and a word-transformation shortest path problem) and a hiring manager round with a lowest common ancestor question. The post gave no scale numbers.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.