Machine coding round

Low-Level Design Problems

40 problems 16 topics 40 companiesUpdated Nov 2026

Machine coding problems with the patterns named, runnable code, and the companies that ask them.

Difficulty
Topics
Companies
Status
Completion filters become available once your progress has loaded. Saving entries for later is not available on this page yet.

0 of 40 completed

40 results

  • Step 1 of the study orderParking Lot

    Multi-floor lot with strategy-based pricing, vehicle assignment, and extensible fee models.

    Strategy Object Creation Composition Pricing
    Flipkart Phonepe Amazon
    about 60 minutes to readBeginner
  • Step 2 of the study orderTic-Tac-Toe

    Generalised N×N board with O(1) win detection, pluggable win rules, and Deque-based turns.

    Strategy State Data Structures
    Amazon Phonepe Adobe
    about 30 minutes to readBeginner
  • Step 3 of the study orderSnake & Ladder

    Turn-based game with configurable board, dice strategies, and multiple player support.

    Strategy State Command Observer
    Phonepe Flipkart
    about 30 minutes to readBeginner
  • Step 4 of the study orderVending Machine

    Idle → selection → payment → dispense as a State machine, with change calculation and inventory.

    State Strategy Inventory
    Phonepe Amazon Flipkart
    about 40 minutes to readBeginner
  • Step 5 of the study orderLibrary Management

    Fine strategies, reservation queue, member tiers, overdue tracking.

    Strategy Observer Pricing Capacity
    Flipkart Goldman Sachs Tcs
    about 35 minutes to readBeginner
  • Step 6 of the study orderDeck of Cards

    Immutable cards from a shared pool, a multi-deck shoe with a cut card, and dealing as iteration

    Object Creation Iteration Data Structures
    Amazon Adobe Phonepe Goldman Sachs
    about 60 minutes to readBeginner
  • Step 7 of the study orderTraffic Light Controller

    A timed state machine per signal, a phase plan that keeps an intersection safe, and emergency preemption

    State Observer Concurrency
    Amazon Microsoft Tcs Google
    about 70 minutes to readBeginner
  • Step 8 of the study orderLogging Framework

    Level filtering, pluggable appenders, async handoff with a bounded queue, and what to drop under load

    Chain Object Creation Composition
    Amazon Flipkart Microsoft Phonepe
    about 65 minutes to readBeginner
  • Step 9 of the study orderSnake Game

    O(1) moves with a deque and a hash set, self-collision without scanning the body, and food that never spawns inside the snake

    Data Structures State Strategy
    Amazon Google Phonepe Microsoft
    about 55 minutes to readBeginner
  • Step 10 of the study orderATM Machine

    A session state machine, a two-phase cash dispenser that cannot half-pay, and reconciliation when the shutter jams

    State Chain Strategy
    Amazon Phonepe Goldman Sachs Banks
    about 55 minutes to readBeginner
  • Step 11 of the study orderSplitwise

    Expense splitting with multiple strategies (equal, exact, percentage), debt simplification.

    Strategy Observer Facade Pricing
    Phonepe Flipkart
    about 40 minutes to readIntermediate
  • Step 12 of the study orderMusic Player

    Shuffle without repeats, play/pause, next/prev, history tracking. Fisher-Yates + Strategy + Observer.

    Strategy Observer State Iteration
    Phonepe Spotify Amazon
    about 25 minutes to readIntermediate
  • Step 13 of the study orderMultilevel Cache

    LRU/LFU eviction, composition of cache levels, read-through and write-through patterns.

    Strategy Composition Facade Data Structures
    Phonepe Flipkart
    about 30 minutes to readIntermediate Pro
  • Step 14 of the study orderURL Shortener

    Base62 encoding with atomic counter, custom aliases, click tracking, expiration, and strategy-based encoding.

    Strategy Repository Object Creation
    Amazon Google Microsoft
    about 30 minutes to readIntermediate Pro
  • Step 15 of the study orderElevator System

    Multi-car dispatch with SCAN/LOOK scheduling, direction state, and swappable dispatch strategy.

    Strategy Dispatch State Facade
    Amazon Uber Google
    about 30 minutes to readIntermediate Pro
  • Step 16 of the study orderRate Limiter

    Token bucket, sliding window, fixed window with strategy pattern. Thread-safe per-client limiting.

    Strategy Object Creation Concurrency
    Google Stripe Uber
    about 30 minutes to readIntermediate Pro
  • Step 17 of the study orderPayment Wallet

    P2P transfers, idempotency, atomic operations, ledger, overdraft prevention.

    Command Observer Object Creation Concurrency
    Phonepe Razorpay Paytm
    about 40 minutes to readIntermediate Pro
  • Step 18 of the study orderTask Scheduler

    Priority queue, thread pool, recurring tasks, delayed execution, cancellation.

    Strategy Observer Command Concurrency
    Google Amazon Microsoft
    about 25 minutes to readIntermediate Pro
  • Step 19 of the study orderE-commerce Cart

    Pricing strategies, coupons, stock validation, tax calculation, checkout flow.

    Strategy Observer Object Creation Pricing
    Amazon Flipkart Myntra
    about 35 minutes to readIntermediate Pro
  • Step 20 of the study orderDelivery Slot Booking

    Capacity management, waitlist FIFO promotion, conflict detection, cancellation.

    Capacity Observer Object Creation Dispatch
    Licious Bigbasket Blinkit
    about 30 minutes to readIntermediate Pro
  • Step 21 of the study orderQueue Management

    Token system with priority queue, multiple counters, assignment strategies, wait time estimation.

    Strategy Observer State Dispatch
    Phonepe Tcs Banks
    about 30 minutes to readIntermediate Pro
  • Step 22 of the study orderFile System

    In-memory file system with mkdir, ls, touch, rm. Tree traversal, path resolution, and thread-safe operations.

    Composition Iteration Data Structures
    Uber Amazon Google
    about 20 minutes to readIntermediate Pro
  • Step 23 of the study orderMovie Ticket Booking

    Seat holds with expiry, exactly-one-winner under concurrent booking, and payment that cannot orphan a seat

    Capacity Concurrency State
    Bookmyshow Amazon Ticketmaster Phonepe
    about 60 minutes to readIntermediate Pro
  • Step 24 of the study orderText Editor

    Commands for invertible edits, snapshots for the ones that are not, and a buffer that does not copy the document per keystroke

    Command Data Structures Composition
    Microsoft Google Adobe Notion
    about 55 minutes to readIntermediate Pro
  • Step 25 of the study orderMeeting Scheduler

    Overlap detection in two O(log n) probes, free-slot search across many calendars, and recurrence without materialising a year

    Capacity Data Structures Strategy
    Google Microsoft Amazon Atlassian
    about 80 minutes to readIntermediate Pro
  • Step 26 of the study orderNotification Service

    Vendor SDKs behind one channel interface, fallback that knows transient from permanent, and preferences that cannot be bypassed

    Observer Chain Strategy
    Amazon Flipkart Swiggy Razorpay
    about 65 minutes to readIntermediate Pro
  • Step 27 of the study orderChat Application

    One hub per room instead of an N-squared peer mesh, ordering that survives concurrent sends, and delivery receipts

    Observer State Data Structures
    Meta Discord Slack Amazon
    about 60 minutes to readIntermediate Pro
  • Step 28 of the study orderCircuit Breaker

    A sliding window that decides when to trip, exactly one trial call on recovery, and a fallback that is honest about staleness

    State Concurrency Strategy
    Amazon Netflix Stripe Uber
    about 60 minutes to readIntermediate Pro
  • Step 29 of the study orderFile Search

    Composable criteria instead of six nullable parameters, lazy traversal that streams the first match, and pruning that skips whole subtrees

    Composition Iteration Strategy
    Amazon Google Microsoft Dropbox
    about 55 minutes to readIntermediate Pro
  • Step 30 of the study orderDiscount Engine

    Stacking rules in a defined order, money that always reconciles to the cent, and a reason string for every rule that did not apply

    Pricing Chain Strategy
    Amazon Flipkart Myntra Shopify
    about 70 minutes to readIntermediate Pro
  • Step 31 of the study orderInventory Management

    Multi-warehouse stock tracking with atomic transfers, thread-safe operations, and repository pattern.

    Repository Facade Concurrency Inventory
    Amazon Flipkart Walmart
    about 35 minutes to readAdvanced Pro
  • Step 32 of the study orderOrder Management

    Order lifecycle with state machine transitions, observer notifications, builder pattern, and atomic stock deduction.

    State Object Creation Observer Inventory
    Amazon Flipkart Swiggy
    about 40 minutes to readAdvanced Pro
  • Step 33 of the study orderRestaurant Booking

    Time-slot reservations with conflict detection, waitlist management, table assignment strategy, and concurrency control.

    Capacity State Repository Concurrency
    Phonepe Swiggy Zomato
    about 40 minutes to readAdvanced Pro
  • Step 34 of the study orderPub/Sub System (Mini-Kafka)

    Topics, partitions, consumer groups, offset tracking, at-least-once delivery.

    Observer Iteration Object Creation Concurrency
    Uber Linkedin Flipkart
    about 35 minutes to readAdvanced Pro
  • Step 35 of the study orderRide Matching Engine

    Proximity matching, trip state machine, fare with surge pricing, driver lifecycle.

    Strategy State Dispatch Pricing
    Uber Ola Rapido
    about 35 minutes to readAdvanced Pro
  • Step 36 of the study orderSpreadsheet Engine

    Recalculating only what changed in dependency order, detecting cycles before they hang, and 100000 cells that share a dozen styles

    Observer Data Structures Composition
    Google Microsoft Figma Notion
    about 75 minutes to readAdvanced Pro
  • Step 37 of the study orderOrder Matching Engine

    Price-time priority in O(log price levels), partial fills that always balance, and one thread per book instead of a lock

    Data Structures Concurrency Command
    Goldman Sachs Zerodha Robinhood Groww
    about 80 minutes to readAdvanced Pro
  • Step 38 of the study orderMini Version Control

    Content-addressed blobs that deduplicate identical files, commits that share unchanged subtrees, and a three-way merge that knows a real conflict

    Composition Data Structures Command
    Atlassian Amazon Microsoft Dropbox
    about 85 minutes to readAdvanced Pro
  • Step 39 of the study orderExpression Evaluator

    Precedence and associativity without a precedence table, an AST that survives new operations, and untrusted input that cannot hang the parser

    Composition Data Structures Object Creation
    Google Amazon Databricks Confluent
    about 60 minutes to readAdvanced Pro
  • Step 40 of the study orderMini ORM

    Change tracking that writes only dirty fields, an identity map so one row is one object, and lazy loading that does not become N plus 1

    Repository Object Creation Concurrency
    Amazon Databricks Atlassian Microsoft
    about 50 minutes to readAdvanced Pro

OOP problems with design patterns, runnable code, and company tags. Built for PhonePe, Flipkart, Swiggy, Razorpay-style machine coding rounds.

What Interviewers Grade On

1
Working Demo Must compile and run end-to-end with a main/demo class.
2
Separation of Concerns Multiple files/classes, each doing one thing well.
3
Strategy Pattern At least one strategy — pricing, eviction, assignment, scoring.
4
Extensibility Adding a new variant = one new class, no edits to existing code.
5
Edge Cases Null inputs, capacity limits, state machine violations.
6
Thread-Safety When shared mutable state exists, synchronize correctly.