Skip to content
Anurag Goel

Low-Level Design

Object-oriented design practice for LLD interviews, organized by theme, with progress tracking saved on this device.

LLD interviews test whether you can turn a fuzzy prompt into classes, interfaces, and relationships that stay clean under new requirements. Most of these don't have one canonical solution — design them on paper or in code, then check your approach against SOLID principles and the pattern it's testing.

0 / 93 completed

Design Patterns (5)

  • Singleton Pattern Implementation easy

    Problem brief

    Create one shared instance of a service within an application.

    Core requirements

    • Control instance creation.
    • Expose a predictable access API.

    Design points to discuss

    Discuss lazy initialization, thread safety, dependency injection, and how tests can replace the instance.

  • Factory Pattern Implementation medium

    Problem brief

    Create related objects without coupling callers to concrete classes.

    Core requirements

    • Select an implementation from input.
    • Reject unsupported product types.

    Design points to discuss

    Compare simple factories and abstract factories; show how a new product is added without changing callers.

  • Observer Pattern Implementation medium

    Problem brief

    Notify interested objects when a publisher changes state.

    Core requirements

    • Register and remove subscribers.
    • Deliver event payloads.

    Design points to discuss

    Define callback ordering, subscriber failures, reentrant callbacks, and cleanup to avoid retained listeners.

  • Strategy Pattern Implementation medium

    Problem brief

    Make an algorithm replaceable while keeping its caller stable.

    Core requirements

    • Define a common strategy interface.
    • Select or replace a strategy at runtime.

    Design points to discuss

    Use a concrete example such as pricing; explain configuration, validation, and testing each strategy independently.

  • Decorator Pattern Implementation medium

    Problem brief

    Attach optional behavior to an object through composable wrappers.

    Core requirements

    • Preserve the component interface.
    • Combine multiple decorators.

    Design points to discuss

    Explain wrapper order, delegation, and how to avoid double application of side effects.

Object-Oriented Design (9)

  • Design Twitter / Threads (Class Design) medium

    Problem brief

    Model a social feed in a single application.

    Core requirements

    • Post messages and follow users.
    • Retrieve a paginated feed.

    Design points to discuss

    Define User, Post, and Follow relationships; discuss deleted posts, self-follow rules, and feed ordering.

  • Design a Closest Common Department Finder medium

    Problem brief

    Find the nearest department shared by several employees.

    Core requirements

    • Represent department ancestry.
    • Resolve employees to departments.

    Design points to discuss

    Discuss missing employees, employees in multiple teams, tree versus graph assumptions, and hierarchy updates.

  • Design a Proximity Search Service (Class Design) medium

    Problem brief

    Provide a local API for finding businesses near a coordinate.

    Core requirements

    • Register and update business locations.
    • Filter by radius and category.

    Design points to discuss

    Separate distance calculation from indexing; define units, boundary inclusion, and invalid coordinate handling.

  • Design a Traffic Light System medium

    Problem brief

    Coordinate traffic lights at an intersection.

    Core requirements

    • Advance through legal light phases.
    • Support pedestrian requests.

    Design points to discuss

    Model states and transition rules; prevent conflicting green signals and define emergency override behavior.

  • Design Parking Lot medium

    Problem brief

    Allocate parking spaces and charge for parking sessions.

    Core requirements

    • Assign a compatible available spot.
    • Issue tickets and calculate exit fees.

    Design points to discuss

    Model vehicles, spots, tickets, and pricing; prevent duplicate allocation and handle lost tickets or a full lot.

  • Design Library Management System medium

    Problem brief

    Manage physical library copies and member loans.

    Core requirements

    • Check out and return copies.
    • Track holds and overdue items.

    Design points to discuss

    Separate book metadata from copies; define borrowing limits, reservation order, and unavailable-copy behavior.

  • Design Elevator System hard

    Problem brief

    Coordinate multiple elevators serving floor requests.

    Core requirements

    • Accept internal and external requests.
    • Choose elevators and next stops.

    Design points to discuss

    Separate dispatch policy from elevator state; handle capacity, direction changes, and out-of-service cars.

  • Design Chat System hard

    Problem brief

    Model users, conversations, and message delivery inside a chat application.

    Core requirements

    • Send messages to conversations.
    • Maintain membership and message history.

    Design points to discuss

    Define message states, permissions, and ordering; make storage and delivery interfaces replaceable.

  • Design File System hard

    Problem brief

    Represent a hierarchical file system with files and directories.

    Core requirements

    • Create, move, and delete nodes.
    • Resolve absolute and relative paths.

    Design points to discuss

    Discuss a composite model, naming collisions, cycle prevention, and permissions at each operation.

Data Structures (5)

  • Design HashMap easy

    Problem brief

    Implement a key-value collection without using a built-in map.

    Core requirements

    • Insert, update, retrieve, and remove keys.
    • Resize as the collection grows.

    Design points to discuss

    Explain collision handling, hash/equality contracts, load factors, and average versus worst-case complexity.

  • Design HashSet easy

    Problem brief

    Implement a collection of unique values.

    Core requirements

    • Add, remove, and test membership.
    • Handle hash collisions.

    Design points to discuss

    Define equality and duplicate insertion behavior; discuss resizing, iteration, and expected operation costs.

  • Design Linked List medium

    Problem brief

    Implement a mutable linked list.

    Core requirements

    • Insert and delete at supported positions.
    • Retrieve elements by index.

    Design points to discuss

    Maintain head, tail, and size invariants; cover empty lists, invalid indexes, and single-element updates.

  • Design Circular Queue medium

    Problem brief

    Implement a fixed-capacity queue using a circular buffer.

    Core requirements

    • Enqueue and dequeue in constant time.
    • Report empty and full states.

    Design points to discuss

    Explain index wraparound, size tracking, and how full and empty states remain distinguishable.

  • Design Browser History medium

    Problem brief

    Track navigation within a browser tab.

    Core requirements

    • Visit URLs and move backward or forward.
    • Discard forward history after a new visit.

    Design points to discuss

    Define cursor bounds, oversized navigation requests, and the representation of current and historical pages.

Concurrency (4)

  • Design Bounded Blocking Queue medium

    Problem brief

    Create a thread-safe queue with bounded capacity.

    Core requirements

    • Block producers when full.
    • Block consumers when empty.

    Design points to discuss

    Use condition variables with predicate checks; discuss shutdown, interruption, fairness, and spurious wakeups.

  • Design Thread Pool hard

    Problem brief

    Execute submitted tasks using a reusable worker pool.

    Core requirements

    • Queue tasks and return results.
    • Support shutdown and rejected submissions.

    Design points to discuss

    Discuss worker lifecycle, bounded queues, task exceptions, cancellation, and graceful versus immediate shutdown.

  • Design Readers-Writers Lock hard

    Problem brief

    Allow concurrent readers while protecting exclusive writes.

    Core requirements

    • Acquire and release read/write access.
    • Prevent conflicting access.

    Design points to discuss

    Define fairness and starvation policy; explain condition predicates, reentrancy assumptions, and lock ownership.

  • Design Producer-Consumer Pattern medium

    Problem brief

    Coordinate producers and consumers through shared work storage.

    Core requirements

    • Publish and consume work safely.
    • Signal completion to waiting workers.

    Design points to discuss

    Explain backpressure, poison pills or close semantics, exception handling, and avoiding missed notifications.

Caching (6)

  • Design an In-Memory Key-Value Store hard

    Problem brief

    Build an in-memory store with typed values and expiration.

    Core requirements

    • Read and mutate supported value types.
    • Expire or evict entries under memory pressure.

    Design points to discuss

    Separate storage, clock, and eviction policy; discuss atomic operations and incompatible value-type requests.

  • Design a DNS caching system hard

    Problem brief

    Cache DNS answers before calling a resolver.

    Core requirements

    • Resolve names through a cache.
    • Respect positive and negative record lifetimes.

    Design points to discuss

    Inject the resolver and clock; discuss concurrent misses, expired records, bounded memory, and lookup failures.

  • Design LRU Cache medium

    Problem brief

    Implement a cache that evicts the least recently used entry.

    Core requirements

    • Get and put in expected constant time.
    • Update recency on successful access.

    Design points to discuss

    Combine a map with a doubly linked list; test capacity zero, overwrites, and repeated access.

  • Design LFU Cache hard

    Problem brief

    Implement a cache that evicts the least frequently used entry.

    Core requirements

    • Track access frequency.
    • Break frequency ties by recency.

    Design points to discuss

    Explain frequency buckets, minimum-frequency tracking, overwrite semantics, and constant-time target operations.

  • Design Trie (Prefix Tree) medium

    Problem brief

    Store strings in a prefix tree.

    Core requirements

    • Insert words and test exact membership.
    • Check whether a prefix exists.

    Design points to discuss

    Define terminal markers, character support, memory trade-offs, and optional deletion of unused branches.

  • Design Autocomplete System hard

    Problem brief

    Suggest matching phrases as characters are entered.

    Core requirements

    • Return ranked suggestions for a prefix.
    • Update frequencies after completed input.

    Design points to discuss

    Separate prefix lookup from ranking; define tie-breaks, no-match behavior, and bounded suggestion count.

Messaging (4)

  • Design Message Queue hard

    Problem brief

    Implement a queue abstraction for processing messages.

    Core requirements

    • Publish and consume messages.
    • Acknowledge completion and retry failures.

    Design points to discuss

    Define message lifecycle, visibility, duplicate delivery, and consumer shutdown without silently losing work.

  • Design Pub-Sub System hard

    Problem brief

    Deliver published events to topic subscribers.

    Core requirements

    • Subscribe and unsubscribe handlers.
    • Publish to multiple topics.

    Design points to discuss

    Define sync versus async delivery, slow-subscriber policy, subscriber errors, and thread-safe subscription changes.

  • Design Chat Room System medium

    Problem brief

    Manage group chat rooms and their participants.

    Core requirements

    • Join or leave rooms.
    • Broadcast messages and retrieve recent history.

    Design points to discuss

    Model room ownership, access checks, disconnected users, message ordering, and membership changes during delivery.

  • Design Notification System medium

    Problem brief

    Route notifications through configurable channels.

    Core requirements

    • Validate notification requests.
    • Apply user preferences and dispatch via adapters.

    Design points to discuss

    Separate templates, delivery strategies, and retry policy; handle unsupported channels and partial delivery failure.

Booking & Reservation Systems (9)

  • Implement Restaurant Waitlist API medium

    Problem brief

    Seat the earliest waiting party that fits an available table.

    Core requirements

    • Join or leave a waitlist.
    • Match a free table by capacity.

    Design points to discuss

    Preserve arrival order among eligible parties; handle duplicate joins, cancellations, and concurrent table assignment.

  • Design Google Calendar medium

    Problem brief

    Model calendars with events and invitations.

    Core requirements

    • Create recurring and one-time events.
    • Accept invitations and detect conflicts.

    Design points to discuss

    Separate recurrence rules from occurrences; cover time zones, daylight-saving changes, and editing one occurrence.

  • Design an Event Management System medium

    Problem brief

    Organize events and attendee registration.

    Core requirements

    • Create and update events.
    • Register attendees within capacity.

    Design points to discuss

    Model event lifecycle, duplicate registration, cancellation, waitlists, and organizer permissions.

  • Design a Movie Ticket Booking System medium

    Problem brief

    Reserve seats for a specific movie showing.

    Core requirements

    • Browse shows and choose seats.
    • Hold seats, pay, and confirm a booking.

    Design points to discuss

    Model seat availability per show; prevent competing holds and handle expiry, failed payment, and cancellation.

  • Design a Hotel Reservation System medium

    Problem brief

    Book hotel rooms for a date range.

    Core requirements

    • Search room availability.
    • Reserve, cancel, and check in.

    Design points to discuss

    Distinguish room types from physical rooms; define overlapping stays, checkout boundaries, and pricing policies.

  • Design a Restaurant Reservation System medium

    Problem brief

    Reserve restaurant tables for parties and time slots.

    Core requirements

    • Find a table with sufficient capacity.
    • Create and cancel reservations.

    Design points to discuss

    Discuss duration, combining tables, no-shows, and preventing overlapping reservations on the same table.

  • Design an Airline Reservation System hard

    Problem brief

    Manage flight reservations and seat assignments.

    Core requirements

    • Find flight instances and reserve seats.
    • Confirm payments and cancel bookings.

    Design points to discuss

    Separate routes from dated flights; model passengers, booking states, seat conflicts, and fare rules.

  • Design a Stadium/Concert Seat Booking System medium

    Problem brief

    Sell seats or general-admission capacity for an event.

    Core requirements

    • Hold inventory temporarily.
    • Confirm or release a booking.

    Design points to discuss

    Distinguish seat maps from capacity counters; discuss hold expiry, duplicate payment callbacks, and refunds.

  • Design a Cab Booking System (Ride-Hailing) hard

    Problem brief

    Model the lifecycle of an on-demand ride.

    Core requirements

    • Request a ride and assign a driver.
    • Start, complete, and cancel trips.

    Design points to discuss

    Define rider, driver, trip, and fare interfaces; prevent double assignment and invalid state transitions.

Games & Puzzles (13)

  • Design a Roller Coaster Simulator medium

    Problem brief

    Calculate and rank scores for multiple roller coaster types.

    Core requirements

    • Accept coaster configurations.
    • Compute type-specific comfort and overall scores.

    Design points to discuss

    Use scoring strategies; define validation, stable ranking, and adding a new coaster without changing the ranking engine.

  • Multi-Team Game System medium

    Problem brief

    Build a reusable game model with teams and configurable rules.

    Core requirements

    • Manage players, teams, and turns.
    • Evaluate game outcomes under a selected rule set.

    Design points to discuss

    Separate game state from rules; cover illegal moves, player removal, and deterministic testing.

  • Design a Battleship game medium

    Problem brief

    Run a two-player naval combat game.

    Core requirements

    • Place ships without overlap.
    • Process attacks and track hits, misses, and sunk ships.

    Design points to discuss

    Hide the opponent board; validate coordinates, repeated attacks, turn ownership, and victory conditions.

  • Design a Geometry API for Point-in-Rectangle Queries easy

    Problem brief

    Determine whether a point lies inside a rectangle.

    Core requirements

    • Represent points and rectangle geometry.
    • Support a documented boundary policy.

    Design points to discuss

    Clarify axis-aligned versus rotated rectangles; discuss coordinate transforms, degenerate shapes, and floating-point tolerance.

  • Design a Bowling Scoring System medium

    Problem brief

    Score a bowling game as rolls arrive.

    Core requirements

    • Track frames and player rolls.
    • Calculate strike and spare bonuses.

    Design points to discuss

    Handle tenth-frame bonus rolls, incomplete scores, invalid pin counts, and a perfect game.

  • Design a Card Game with Turns and Scoring medium

    Problem brief

    Implement a turn-based card game beyond just a deck.

    Core requirements

    • Deal cards and validate actions.
    • Advance turns and determine a winner.

    Design points to discuss

    Separate deck, hand, player, and rule objects; support reshuffling and invalid actions without corrupting state.

  • Design Connect Four easy

    Problem brief

    Implement a two-player token-dropping board game.

    Core requirements

    • Drop a token into a non-full column.
    • Detect wins and draws.

    Design points to discuss

    Check horizontal, vertical, and diagonal runs; reject moves after completion and preserve turn order.

  • Design Tic-Tac-Toe easy

    Problem brief

    Implement a two-player grid game.

    Core requirements

    • Place marks in empty cells.
    • Detect winning lines and a draw.

    Design points to discuss

    Define board size, turn validation, reset behavior, and whether winner checks scan or maintain counters.

  • Design a Chess Game hard

    Problem brief

    Implement chess rules and game state.

    Core requirements

    • Validate piece moves and turns.
    • Detect check, checkmate, and stalemate.

    Design points to discuss

    Separate movement from king-safety validation; explicitly scope castling, promotion, en passant, and move history.

  • Design Snake and Ladder medium

    Problem brief

    Simulate players moving on a numbered board.

    Core requirements

    • Roll dice and move tokens.
    • Apply snakes and ladders.

    Design points to discuss

    Model board transitions and configurable dice; define overshoot rules, winning conditions, and deterministic tests.

  • Design a Deck of Cards easy

    Problem brief

    Represent a deck that can be shuffled and dealt.

    Core requirements

    • Create distinct cards.
    • Shuffle, draw, and reset the deck.

    Design points to discuss

    Discuss Fisher-Yates shuffling, injectable randomness, duplicate prevention, and behavior when the deck is exhausted.

  • Design a Sudoku Solver medium

    Problem brief

    Solve a partially filled Sudoku board.

    Core requirements

    • Validate initial constraints.
    • Fill empty cells or report no solution.

    Design points to discuss

    Separate board representation from solving; discuss candidate tracking, backtracking, and detecting multiple solutions if required.

  • Design Minesweeper medium

    Problem brief

    Implement a playable minefield board.

    Core requirements

    • Reveal cells and flag suspected mines.
    • Expand empty regions and detect game completion.

    Design points to discuss

    Handle first-click policy, neighboring counts, repeated reveals, and revealing mines only when appropriate.

Everyday Systems (19)

  • Design a Pizza Billing System medium

    Problem brief

    Calculate the price of customizable pizzas.

    Core requirements

    • Choose base, size, and toppings.
    • Produce an itemized total.

    Design points to discuss

    Model pricing rules independently; define repeated toppings, discounts, rounding, and invalid combinations.

  • Design a grocery subscription service medium

    Problem brief

    Turn recurring grocery subscriptions into orders.

    Core requirements

    • Schedule subscription occurrences.
    • Check wallet funds and reserve stock.

    Design points to discuss

    Model pause and cancellation; prevent duplicate orders and define recovery when payment or stock allocation fails.

  • Design a coffee shop ordering and receipt system medium

    Problem brief

    Process configurable coffee orders and print receipts.

    Core requirements

    • Customize drinks and add items.
    • Calculate tax, discounts, and totals.

    Design points to discuss

    Separate menu definitions from ordered items; preserve price snapshots and reject unsupported customizations.

  • Design an Offer Letter Template Engine (ATS) medium

    Problem brief

    Generate offer letters from templates and calculated fields.

    Core requirements

    • Replace direct placeholders.
    • Evaluate formulas referencing other fields.

    Design points to discuss

    Build a dependency graph; detect cycles, missing values, invalid formulas, and formatting errors.

  • Design a Support Agent Rating System medium

    Problem brief

    Track customer ratings of support agents.

    Core requirements

    • Record validated ratings.
    • Retrieve agent averages and rankings.

    Design points to discuss

    Maintain count and sum, define tie-breaks, and handle updates or deletion of a previously submitted rating.

  • Design a job board system medium

    Problem brief

    Model job listings and applications.

    Core requirements

    • Employers publish listings.
    • Candidates search and apply.

    Design points to discuss

    Define listing lifecycle, role permissions, duplicate applications, and extensible search criteria.

  • Design a Product Search and Filter API medium

    Problem brief

    Filter a product catalog through a composable query API.

    Core requirements

    • Combine category, price, and eligibility filters.
    • Sort and paginate results.

    Design points to discuss

    Use predicates or specifications; define missing attributes, AND/OR composition, and stable result ordering.

  • Design a Shipping Cost Calculator medium

    Problem brief

    Compute shipping prices from package characteristics.

    Core requirements

    • Select shipping methods.
    • Apply weight tiers and optional surcharges.

    Design points to discuss

    Separate pricing strategies from input validation; define units, rounding, unsupported routes, and quote breakdowns.

  • Design a package delivery service medium

    Problem brief

    Track a package through delivery states.

    Core requirements

    • Quote a service and create a shipment.
    • Record status changes and history.

    Design points to discuss

    Define legal transitions, delivery types, duplicate tracking events, and exceptions such as failed delivery.

  • Design Alexa Device Classes with Hardware Capabilities medium

    Problem brief

    Model devices with different hardware capabilities.

    Core requirements

    • Represent speaker, display, and battery features.
    • Return status through supported output channels.

    Design points to discuss

    Prefer composable capabilities to a large inheritance tree; test devices with missing hardware and changing battery state.

  • Design a Music Player (Class Design) medium

    Problem brief

    Model a music player and its library.

    Core requirements

    • Manage playlists and a playback queue.
    • Play, pause, skip, and repeat tracks.

    Design points to discuss

    Separate playback state from storage and audio output; define empty queues, unavailable tracks, and shuffle behavior.

  • Design Inventory Management (Class Design) hard

    Problem brief

    Track stock across warehouses within an application.

    Core requirements

    • Receive, reserve, and release quantities.
    • Notify when stock crosses a low threshold.

    Design points to discuss

    Define available versus reserved stock, atomic updates, transfer rules, and duplicate adjustment handling.

  • Design an ATM Machine medium

    Problem brief

    Model an ATM session and cash handling.

    Core requirements

    • Authenticate a cardholder.
    • Withdraw cash, deposit, and query a balance.

    Design points to discuss

    Separate bank and dispenser interfaces; handle denomination limits, failed dispensing, session timeout, and reversals.

  • Design a Vending Machine medium

    Problem brief

    Dispense products after accepting sufficient payment.

    Core requirements

    • Choose an available item.
    • Accept funds and return change.

    Design points to discuss

    Model idle, selection, payment, and dispensing states; recover from insufficient change, cancellation, and hardware failure.

  • Design Splitwise (Expense Sharing App) hard

    Problem brief

    Track shared expenses and balances among people.

    Core requirements

    • Split expenses equally or by shares.
    • Record settlements and display balances.

    Design points to discuss

    Use exact monetary arithmetic; validate split totals, support edits, and distinguish debt simplification from transaction history.

  • Design a Shopping Cart / Checkout System medium

    Problem brief

    Manage a cart through checkout.

    Core requirements

    • Add and update quantities.
    • Apply pricing rules and create an order.

    Design points to discuss

    Separate mutable carts from finalized orders; handle price changes, stock validation, discount order, and repeated checkout.

  • Design a Meeting Room Scheduler medium

    Problem brief

    Find and reserve meeting rooms for intervals.

    Core requirements

    • Match rooms by capacity.
    • Create or cancel non-overlapping reservations.

    Design points to discuss

    Define interval boundaries, concurrent booking, recurring meetings, and idempotent cancellation.

  • Design a Car Rental System medium

    Problem brief

    Manage vehicle rentals over time.

    Core requirements

    • Search and reserve eligible vehicles.
    • Check out, return, and calculate charges.

    Design points to discuss

    Model vehicle status, rental periods, damage or late fees, and overlapping reservations.

  • Design an Amazon Locker System medium

    Problem brief

    Assign packages to lockers with controlled pickup.

    Core requirements

    • Choose a fitting compartment.
    • Issue an expiring pickup code and release storage.

    Design points to discuss

    Handle full lockers, wrong or reused codes, package expiry, and concurrent assignment.

Developer Tools (LLD) (18)

  • Design a Spreadsheet Engine hard

    Problem brief

    Maintain spreadsheet cells with dependent formulas.

    Core requirements

    • Set literal values or formulas.
    • Recompute affected cells after changes.

    Design points to discuss

    Model a dependency graph; detect circular references, invalid cells, and avoid recomputing unaffected formulas.

  • Design a Task Scheduler (Class Design) hard

    Problem brief

    Run tasks at specified times or recurring intervals.

    Core requirements

    • Schedule and cancel tasks.
    • Execute due work by priority.

    Design points to discuss

    Inject a clock and executor; discuss fixed-rate versus fixed-delay recurrence, missed runs, and shutdown.

  • Design a Heterogeneous Object Query API medium

    Problem brief

    Search heterogeneous objects through typed predicates.

    Core requirements

    • Combine filters across object types.
    • Handle absent or incompatible attributes.

    Design points to discuss

    Separate attribute access from query evaluation; specify AND/OR rules, comparison types, and extension points.

  • Design a Linux Find Command API medium

    Problem brief

    Find files using composable search criteria.

    Core requirements

    • Traverse directory trees.
    • Filter by name, size, type, and logical combinations.

    Design points to discuss

    Discuss symlinks, traversal errors, lazy iteration, and adding filters without rewriting traversal.

  • Design a Cloud Storage Sync Client hard

    Problem brief

    Synchronize local files with remote storage.

    Core requirements

    • Detect edits and upload or download changes.
    • Resume interrupted transfers.

    Design points to discuss

    Model sync states, conflict policy, local metadata, rename detection, and retries that do not overwrite newer edits.

  • Design a Circuit Breaker hard

    Problem brief

    Protect an application from a failing dependency.

    Core requirements

    • Transition between closed, open, and half-open states.
    • Limit trial requests during recovery.

    Design points to discuss

    Inject clock and failure policy; discuss thread safety, timeouts, fallbacks, and which exceptions count as failures.

  • Design a pattern matching system medium

    Problem brief

    Match strings against wildcard expressions.

    Core requirements

    • Support literal characters, star, and question-mark tokens.
    • Return a documented match result.

    Design points to discuss

    Define escaping and full-string versus substring matching; discuss repeated wildcards and worst-case runtime.

  • Design a Vector Graphics Drawing API hard

    Problem brief

    Provide editing operations for vector shapes.

    Core requirements

    • Create, move, and resize shapes.
    • Batch drag updates and commit changes.

    Design points to discuss

    Separate transient interaction from document state; model commands, coordinate spaces, undo, and rendering adapters.

  • Design a Device Config Validator medium

    Problem brief

    Validate device configurations using extensible rules.

    Core requirements

    • Report missing or incompatible fields.
    • Return all errors with device and field context.

    Design points to discuss

    Compose reusable validators; handle duplicates, rule ordering, and dependent checks without hiding useful errors.

  • Design a Version Control System hard

    Problem brief

    Track versions of files in a simplified repository.

    Core requirements

    • Commit snapshots and inspect history.
    • Restore file content from a previous commit.

    Design points to discuss

    Separate immutable commits from the working tree; discuss storage reuse, deleted files, and invalid version references.

  • Design a Package Dependency Manager hard

    Problem brief

    Resolve and install packages with dependencies.

    Core requirements

    • Compute dependency order.
    • Detect missing packages and cycles.

    Design points to discuss

    Define version constraints, shared dependencies, failure rollback, and deterministic installation plans.

  • Design a Database Query Execution API hard

    Problem brief

    Execute database queries through clean abstractions.

    Core requirements

    • Acquire and release connections.
    • Bind parameters and map results.

    Design points to discuss

    Use resource-safe cleanup; define transaction boundaries, timeouts, cancellation, and error propagation.

  • Design a Logging Framework medium

    Problem brief

    Route application logs to configurable outputs.

    Core requirements

    • Filter by level and format records.
    • Support multiple sinks.

    Design points to discuss

    Separate logger, formatter, and appender; discuss concurrent writes, buffering, shutdown, and failed sinks.

  • Design a Rate Limiter (Class Design) medium

    Problem brief

    Limit how often a caller can perform an operation.

    Core requirements

    • Identify callers and evaluate a quota.
    • Expire or refill usage state.

    Design points to discuss

    Compare token-bucket and sliding-window policies; inject a clock and ensure concurrent requests cannot overspend quota.

  • Design a Text Editor with Undo/Redo medium

    Problem brief

    Support reversible edits to a text document.

    Core requirements

    • Insert and delete text.
    • Undo and redo commands.

    Design points to discuss

    Store enough inverse information; define command grouping, redo invalidation after new edits, and history limits.

  • Design an In-Memory File System hard

    Problem brief

    Implement files and directories entirely in memory.

    Core requirements

    • Create directories and append or read file content.
    • List paths consistently.

    Design points to discuss

    Specify path normalization, file/directory collisions, missing parents, and deterministic listing order.

  • Design a Cache with Pluggable Eviction Policies hard

    Problem brief

    Build a cache with interchangeable eviction behavior.

    Core requirements

    • Get and put entries within a capacity.
    • Swap LRU, LFU, or another policy.

    Design points to discuss

    Define storage-policy hooks and invariants; cover overwrite, removal, and policy state synchronization.

  • Design a URL Shortener (Class Design) medium

    Problem brief

    Expose shortening and lookup through application classes.

    Core requirements

    • Generate unique aliases.
    • Resolve aliases and expire mappings.

    Design points to discuss

    Inject a repository, clock, and ID generator; discuss collisions, validation, and custom alias ownership.

Media & Playback (1)

  • Design a Music Player Shuffle Algorithm medium

    Problem brief

    Shuffle a music queue while reducing repeated artists.

    Core requirements

    • Include each track once per cycle.
    • Prefer a different artist when possible.

    Design points to discuss

    Explain unavoidable repeats in imbalanced libraries; inject randomness and define behavior when tracks are added mid-cycle.