What Is a Machine Coding Round?
A machine coding round (also called an LLD round or design coding round) is a 60–90 minute take-home or live coding exercise where you design and implement a working mini-application from scratch. It's used extensively by Indian product companies to evaluate real-world coding ability.
Unlike a DSA round where you solve isolated algorithmic problems, a machine coding round asks you to build something that:
- Has multiple interacting classes with proper responsibilities
- Is written in clean, readable, production-quality code
- Handles edge cases and has at least basic test coverage
- Demonstrates extensibility through good OOP design
Companies Using Machine Coding Rounds
| Company | Format | Duration | Key Expectations |
|---|---|---|---|
| Flipkart | Live coding (shared screen) | 75–90 min | Working code, clean OOP, testable design |
| Razorpay | Take-home (2–3 hrs) | 2–3 hrs | High code quality, tests mandatory, extensibility |
| CRED | Live coding or take-home | 60–90 min | Product thinking + design patterns + SOLID |
| Swiggy | Live coding | 60–75 min | Clean classes, working solution, edge cases |
| PhonePe | Live coding | 60 min | Functional code with correct abstractions |
| Meesho | Live coding | 60 min | Working solution first, clean code second |
| Groww | Take-home or live | 90 min | Fintech domain awareness, tests preferred |
| Paytm | Live coding | 60 min | Practical fintech-adjacent problems |
| Zomato | Live coding | 60 min | Delivery domain problems, clean OOP |
| Uber India | Take-home | 3 hrs | High standards, comprehensive tests, extensibility |
| Atlassian | Take-home | 3–4 hrs | Production quality, tests, documentation |
What Evaluators Look For (Scoring Breakdown)
Machine coding reviewers typically evaluate on 5 dimensions. Understanding these helps you prioritize during the limited time available.
Correctness
Does the code compile and run correctly for all given test cases and edge cases? This is non-negotiable — broken code that doesn't run is an automatic no-hire.
Code Quality
Naming, readability, no magic numbers, small focused methods, no duplicated logic. Code another engineer could read and extend.
Design / OOP
Proper class hierarchy, SOLID principles, appropriate use of design patterns, extensible structure.
Test Coverage
Unit tests for key flows. Tests signal maturity and also validate your own logic. At least happy path + 2–3 edge cases tested.
Extensibility Demo
Either in comments or a brief README: "To add a new X, you only need to implement interface Y." Shows you designed for change.
- Code that doesn't compile
- Single giant class or method (god class)
- No tests at all (for take-home rounds)
- Hardcoded test data in main() only — no class structure
- Using only procedural code with no OOP
The 45-Minute Machine Coding Framework
For live rounds (60–90 min), use this structured approach. The key insight: working ugly code beats unfinished beautiful code every time.
Clarify Requirements
Ask about scope: what features are must-have vs nice-to-have? What's the input/output format? Any scale or concurrency constraints? Don't start coding until requirements are clear.
Design & Entity Identification
Identify the core entities (nouns) and actions (verbs). Sketch class names and their responsibilities. State which design patterns you'll use and why. Talk through your design before writing any code.
Core Implementation
Implement the core flow first — the happy path that covers the main use case. Get this working before adding bells and whistles. Compile and run mental tests as you go.
Edge Cases & Polish
Handle edge cases (nulls, empty collections, boundary conditions). Clean up naming, extract helper methods, add interface abstraction where missing.
Tests & Extensibility
Write at least 3–5 unit tests. Add a brief comment on how the design supports future extensions (new payment methods, new notification channels, etc.).
30 Machine Coding Problems by Category
E-Commerce & Marketplace
Design Amazon / Flipkart Cart
Add/remove items, apply coupons, calculate total with taxes, checkout flow.
Design a Vending Machine
State machine: idle → item selected → payment → dispensing. Handle insufficient funds.
Design an Inventory Management System
Multi-warehouse, SKU tracking, reorder levels, stock transfer between warehouses.
Design a Flash Sale System
Limited quantity, first-come-first-served, race condition handling, notification to waitlist.
Ride Sharing & Logistics
Design a Cab Booking System (Uber/Ola)
Driver matching, ride states, dynamic pricing, trip history, ratings.
Design a Food Delivery System (Swiggy/Zomato)
Restaurant, menu, order flow, delivery agent assignment, live tracking states.
Design a Parking Lot System
Multiple levels, vehicle types (bike/car/truck), ticket generation, fee calculation.
Design a Library Management System
Book checkout, return, fine calculation, search, member management.
Fintech & Payments
Design a Digital Wallet
Credit/debit, transfer, balance check, transaction history, ACID-safe operations.
Design a Rate Limiter
Token bucket or sliding window, per-user and per-endpoint limits, thread-safe.
Design a Bill Splitting App
Group expenses, settlement algorithm (minimize transactions), track who paid what.
Design an ATM System
Card authentication, state machine, cash dispensing, balance inquiry, error handling.
Communication & Collaboration
Design a Slack-like Messaging System
Users, channels, DMs, message history, @mentions, online status.
Design a Notification System
Multiple channels (SMS/Email/Push), user preferences, priority queues, retry.
Design a Cricket Scoring App
Match, team, innings, ball-by-ball scoring, stats computation, scoreboard display.
Design a Chess Game
Board, pieces, valid moves, check/checkmate detection, game state management.
Data Structures as Applications
Design an LRU Cache
O(1) get/put using HashMap + Doubly Linked List. Thread-safe variant is harder.
Design a Task Scheduler
Schedule tasks with priorities, cron-like recurring jobs, dependency graph.
Design an In-Memory Key-Value Store (mini Redis)
GET/SET/DEL/EXPIRE, TTL-based expiry, eviction policy.
Design a Leaderboard
Add/update score, top-N players, rank of a specific player, time-windowed leaderboard.
Practice Machine Coding with AI feedback
Start Free Trial on PrepflixSample Walkthrough — Parking Lot System
Let's walk through the full machine coding approach for one of the most commonly asked problems: Design a Parking Lot.
Step 1: Clarify Requirements
- Multiple floors, multiple spots per floor
- 3 vehicle types: Motorcycle, Car, Truck (different spot sizes)
- Generate ticket on entry, calculate fee on exit
- Fee: ₹20/hr motorcycle, ₹50/hr car, ₹100/hr truck
- Find nearest available spot
Step 2: Identify Classes
Step 3: Key Code — ParkingSpot
Step 4: FeeCalculator (Strategy Pattern)
7 Machine Coding Mistakes to Avoid
4-Week Machine Coding Preparation Plan
| Week | Focus | Problems to Implement | Daily Goal |
|---|---|---|---|
| Week 1 | OOP Foundations + SOLID | Parking Lot, Vending Machine, Library System | 1 problem fully implemented |
| Week 2 | Design Patterns in Code | LRU Cache, Notification System, ATM System | 1 problem + identify patterns used |
| Week 3 | Domain-specific Problems | Cab Booking, Digital Wallet, Inventory System | 1 problem + add tests |
| Week 4 | Timed Mock Rounds | 3 full timed rounds (60 min each) | 1 timed mock + review |