Low-level design
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
Object-oriented design for interviews: the framework, design principles and patterns, concurrency, and problem breakdowns you can practice in the code runner.
45 write-ups
| Title | Difficulty |
|---|---|
| Strategy Pattern How the Strategy pattern replaces if/else chains on a type with swappable classes, with a ride fare example, a parking lot walkthrough, variations and when not to use it. | |
| Design a Parking Lot Design a multi-level parking lot with spot sizes, fitting rules, tickets on entry, fees on exit through a swappable pricing strategy, and live availability counts. | Medium |
| Design Amazon Locker Design a self-service package locker with locker sizes, best-fit assignment, one-time pickup codes, a hold time after which packages expire, and a courier sweep that takes them back. | Medium |
| Design an Elevator System Design a multi-elevator controller that moves each car with the SCAN (LOOK) algorithm and dispatches every hall call to the car that would arrive first. | Medium |
| Design Connect Four Design Connect Four with gravity drops through column heights, turn checks, wins in four directions found by walking out from the last disc, draws, and room for undo and other board sizes. | Easy |
| Design Tic-Tac-Toe Design tic-tac-toe on an N by N board with turn checks, rejected moves, wins and draws, and a win check that costs O(1) per move thanks to running line counters. | Easy |
| Design a Board Game Framework Design one engine that runs many turn-based games, with Ludo and Uno as plug-in rules, a shared turn check and move log, online rooms, and replays rebuilt from the moves. | Medium |
| Design a Calendar Design a shared calendar with recurring events stored as rules plus one-off edits and deletes, reminders fired by a clock tick, and team events that need N free members within working hours. | Medium |
| Design a Clinic Appointment System Design a clinic booking system where doctors publish one-hour slots, patients search by specialty, book and cancel, and a first-come waitlist hands freed slots to the next patient. | Medium |
| Design a Customer Support Chat Design an Intercom-style support inbox with conversations routed to agents by capacity, helper agents who join, read receipts with per-user watermarks, and toggled emoji reactions. | Medium |
| Design a Feature Flag Service Design a feature flag service with kill switches, targeting rules, sticky percentage rollouts, a versioned config with per-flag rollback, and watchers that never miss a change. | Medium |
| Design a Flight or Train Booking System Design a flight booking system with route search, seat classes, group bookings, automatic seat numbers, refunds through a swappable policy, and airline-side flight cancellations. | Medium |
| Design a Food Delivery Service Design a DoorDash-style food delivery service with an order life cycle, nearest-courier assignment behind a swappable strategy, a wait queue when no courier is free, and cancellations. | Medium |
| Design a Job Scheduler Design a job scheduler that runs immediate, one-off and recurring jobs on a fixed worker pool, with an event loop over timers, clear status tracking, cancellation and room for cron schedules. | Medium |
| Design a JSON/XML Parser Design a parser that reads JSON and a subset of XML into one document tree, with a tokenizer, recursive descent, numbers kept exactly, and a registry that makes formats swappable. | Medium |
| Design a Lead Distribution Engine Design an engine that hands incoming sales leads to agents, with a swappable rule per business unit (round robin, least loaded, skill match), agent capacity and availability. | Medium |
| Design a Library Management System Design a library system with books and their physical copies, members with loan limits, due dates and late fines, and a first-come-first-served hold queue that keeps returned copies for the next member. | Medium |
| Design a Load Balancer Design an in-process load balancer with pluggable round robin, weighted, least connections and random picking, health status, and retries that move a failed request to another backend. | Medium |
| Design a Logging Framework Design a logging framework with levels, appenders and formatters, an async bounded buffer with backpressure policies and flush, and an audit trail that never loses an entry. | Medium |
| Design a Memory Allocator Design a malloc-style allocator over a fixed heap with allocate, free and reallocate, first-fit and best-fit placement, block splitting, coalescing of free neighbours, and fragmentation stats. | Hard |