The interview note also referenced several low-level design and backend design questions. For each prompt, define the core APIs, data model, major classes or services, edge cases, and how you would make the design extensible.
-
Build an expense rules engine
Design a service that evaluates employee expense claims against configurable business rules. A rule may depend on fields such as employee level, country, department, expense category, merchant type, amount, currency, and date. The engine should return decisions such as
approve
,
reject
, or
manual_review
, along with explanations showing which rules fired.
-
Design a web API for an article voting system
Design backend APIs for upvoting and downvoting articles. A user should have at most one active vote per article, should be able to change or remove a vote, and article scores should be queryable efficiently. Discuss idempotency, authentication, hot articles, and consistency of vote counters.
-
Design a music player
Design the object model and major components for a music player that supports tracks, playlists, a play queue, play/pause/next/previous, shuffle, repeat modes, and playback state. Focus on clean abstractions and extensibility.
-
Design a food delivery billing system
Design the billing component for a food delivery app. Given an order, compute the full price breakdown including item totals, taxes, delivery fee, service fee, surge pricing, promotions or coupons, tips, and refunds or adjustments. The system should be auditable and deterministic.
-
Design a key-value store
Design a key-value store supporting at least
put
,
get
, and
delete
. Discuss optional features such as TTL expiration, prefix scans, persistence, concurrency, and scaling from a single process to a distributed service.