LLD / Machine Coding Guide 2026

Machine Coding Round Guide India
How to Ace It at Top Companies 2026

Step-by-step approach, 30+ problems, evaluation criteria, and company-specific expectations for Flipkart, Razorpay, CRED, Swiggy, PhonePe, Meesho and more.

Updated May 2026 20 min read 30+ Problems India
Machine Coding Round India Guide 2026

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
🎯
Machine Coding vs LLD vs System Design Machine Coding = write working code for a mini-system (60–90 min). LLD = design class diagrams and interfaces, may or may not include code. System Design (HLD) = design large-scale distributed systems (databases, queues, services). Machine coding is LLD made concrete.

Companies Using Machine Coding Rounds

CompanyFormatDurationKey Expectations
FlipkartLive coding (shared screen)75–90 minWorking code, clean OOP, testable design
RazorpayTake-home (2–3 hrs)2–3 hrsHigh code quality, tests mandatory, extensibility
CREDLive coding or take-home60–90 minProduct thinking + design patterns + SOLID
SwiggyLive coding60–75 minClean classes, working solution, edge cases
PhonePeLive coding60 minFunctional code with correct abstractions
MeeshoLive coding60 minWorking solution first, clean code second
GrowwTake-home or live90 minFintech domain awareness, tests preferred
PaytmLive coding60 minPractical fintech-adjacent problems
ZomatoLive coding60 minDelivery domain problems, clean OOP
Uber IndiaTake-home3 hrsHigh standards, comprehensive tests, extensibility
AtlassianTake-home3–4 hrsProduction 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.

35%

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.

25%

Code Quality

Naming, readability, no magic numbers, small focused methods, no duplicated logic. Code another engineer could read and extend.

20%

Design / OOP

Proper class hierarchy, SOLID principles, appropriate use of design patterns, extensible structure.

15%

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.

5%

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.

Instant Disqualifiers
  • 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.

0–5 min

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.

5–15 min

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.

15–35 min

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.

35–50 min

Edge Cases & Polish

Handle edge cases (nulls, empty collections, boundary conditions). Clean up naming, extract helper methods, add interface abstraction where missing.

50–60 min

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.).

Time Management Rule If you're running out of time at minute 45, prioritize: (1) Make it compile. (2) Make the happy path work. (3) Add one test. A working core solution beats an incomplete perfect solution every time.

30 Machine Coding Problems by Category

E-Commerce & Marketplace

Medium

Design Amazon / Flipkart Cart

Add/remove items, apply coupons, calculate total with taxes, checkout flow.

Flipkart, Meesho, Amazon
Medium

Design a Vending Machine

State machine: idle → item selected → payment → dispensing. Handle insufficient funds.

Amazon, Flipkart, PhonePe
Hard

Design an Inventory Management System

Multi-warehouse, SKU tracking, reorder levels, stock transfer between warehouses.

Flipkart, Meesho, Swiggy
Medium

Design a Flash Sale System

Limited quantity, first-come-first-served, race condition handling, notification to waitlist.

Flipkart, Meesho

Ride Sharing & Logistics

Hard

Design a Cab Booking System (Uber/Ola)

Driver matching, ride states, dynamic pricing, trip history, ratings.

Uber India, Ola, Swiggy
Hard

Design a Food Delivery System (Swiggy/Zomato)

Restaurant, menu, order flow, delivery agent assignment, live tracking states.

Swiggy, Zomato
Medium

Design a Parking Lot System

Multiple levels, vehicle types (bike/car/truck), ticket generation, fee calculation.

Flipkart, Amazon, Paytm
Medium

Design a Library Management System

Book checkout, return, fine calculation, search, member management.

Amazon, Atlassian

Fintech & Payments

Hard

Design a Digital Wallet

Credit/debit, transfer, balance check, transaction history, ACID-safe operations.

Paytm, Groww, PhonePe, Razorpay
Hard

Design a Rate Limiter

Token bucket or sliding window, per-user and per-endpoint limits, thread-safe.

Razorpay, Paytm, CRED
Hard

Design a Bill Splitting App

Group expenses, settlement algorithm (minimize transactions), track who paid what.

CRED, Razorpay, Groww
Medium

Design an ATM System

Card authentication, state machine, cash dispensing, balance inquiry, error handling.

Paytm, PhonePe, CRED

Communication & Collaboration

Hard

Design a Slack-like Messaging System

Users, channels, DMs, message history, @mentions, online status.

Atlassian, Razorpay, CRED
Medium

Design a Notification System

Multiple channels (SMS/Email/Push), user preferences, priority queues, retry.

All companies
Medium

Design a Cricket Scoring App

Match, team, innings, ball-by-ball scoring, stats computation, scoreboard display.

Groww, Swiggy, Flipkart
Hard

Design a Chess Game

Board, pieces, valid moves, check/checkmate detection, game state management.

Uber, Atlassian, Amazon

Data Structures as Applications

Medium

Design an LRU Cache

O(1) get/put using HashMap + Doubly Linked List. Thread-safe variant is harder.

Amazon, Google, Paytm
Medium

Design a Task Scheduler

Schedule tasks with priorities, cron-like recurring jobs, dependency graph.

Atlassian, Amazon
Medium

Design an In-Memory Key-Value Store (mini Redis)

GET/SET/DEL/EXPIRE, TTL-based expiry, eviction policy.

Razorpay, Flipkart
Medium

Design a Leaderboard

Add/update score, top-N players, rank of a specific player, time-windowed leaderboard.

CRED, Groww, Meesho

Practice Machine Coding with AI feedback

Start Free Trial on Prepflix

Sample 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

// Core entities ParkingLot — Singleton, manages floors ParkingFloor — List of spots, entry/exit gates ParkingSpot (abstract) → MotorcycleSpot, CarSpot, TruckSpot Vehicle (abstract) → Motorcycle, Car, Truck ParkingTicket — vehicle, spot, entryTime FeeCalculator (Strategy pattern) → per vehicle type DisplayBoard — shows free spots count per type

Step 3: Key Code — ParkingSpot

abstract class ParkingSpot { private final String id; private boolean isFree = true; private Vehicle currentVehicle; abstract boolean canFit(VehicleType type); synchronized boolean assignVehicle(Vehicle v) { if (!isFree || !canFit(v.getType())) return false; isFree = false; currentVehicle = v; return true; } synchronized void removeVehicle() { isFree = true; currentVehicle = null; } } class CarSpot extends ParkingSpot { boolean canFit(VehicleType type) { return type == VehicleType.CAR || type == VehicleType.MOTORCYCLE; } }

Step 4: FeeCalculator (Strategy Pattern)

interface FeeStrategy { double calculate(long durationMinutes); } class CarFeeStrategy implements FeeStrategy { private static final double RATE = 50.0; // per hour public double calculate(long mins) { return Math.ceil(mins / 60.0) * RATE; } } // Register in FeeCalculatorFactory — add new vehicle type without changing existing code (OCP)

7 Machine Coding Mistakes to Avoid

Mistake 1: Starting to code before designing — Coding without a design plan leads to spaghetti code. Always spend 10 minutes designing your class hierarchy before writing any code.
Mistake 2: Over-engineering — Adding 15 design patterns to a 60-minute problem. Use patterns where they genuinely help extensibility, not to show off.
Mistake 3: Chasing perfection over completion — An unfinished "perfect" design fails harder than a completed "imperfect" one. Work code wins every time.
Mistake 4: No tests — For take-home rounds, no tests is an automatic downgrade. Write even 3–5 basic tests for the core flow.
Mistake 5: Single massive class — If your main class has 20+ methods, you have a god class. Refactor responsibilities into separate classes.
Mistake 6: Not talking through your approach — In live rounds, silence is deadly. Think out loud — interviewers prefer hearing your reasoning even if you go down a wrong path initially.
Mistake 7: Ignoring thread safety in fintech problems — If you're designing a wallet, cart, or reservation system, concurrent access is a real concern. Use synchronized or mention where locks are needed.

4-Week Machine Coding Preparation Plan

WeekFocusProblems to ImplementDaily 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
💡
The Right Way to Practice Machine Coding Don't just look at solutions. For each problem: (1) Attempt for 60 minutes with no hints. (2) Review code quality, not just functionality. (3) Ask yourself: "If tomorrow I need to add a new vehicle type / payment method / notification channel, does my design support it without changing existing code?" That's the OCP test.

Frequently Asked Questions

What is a machine coding round in Indian interviews?
A machine coding round is a 60–90 minute coding exercise where you design and implement a complete mini-application. Unlike DSA rounds, it tests real-world coding ability — OOP design, clean code, and working implementation with tests.
How is machine coding different from DSA rounds?
DSA rounds test algorithmic problem-solving on isolated problems. Machine coding rounds test your ability to design a complete mini-system with multiple interacting classes, good OOP, extensible design, and working code — evaluated by human reviewers, not online judges.
What do interviewers look for in machine coding?
In order of importance: (1) Correctness — code must compile and run. (2) Code quality — clean naming, focused methods. (3) OOP design — SOLID principles, design patterns. (4) Test coverage — at least basic unit tests. (5) Extensibility — can the design absorb new requirements?
Which companies have a machine coding round?
Companies with prominent machine coding rounds in India: Flipkart, Razorpay, CRED, Swiggy, PhonePe, Meesho, Groww, Paytm, Zomato, Uber India, and Atlassian. Most Indian Series B+ startups use this format.
Should I use a specific language for machine coding?
Use the language you're most proficient in. Java and Python are the most common choices. Java has richer OOP constructs (interfaces, generics) which can make design clearer. Python is faster to write. Use whatever allows you to produce clean, working code fastest.
Pranjal Jain - Prepflix Founder
Pranjal Jain

IIT Kanpur alumnus, software engineer, and founder of Prepflix. Has mentored 5,000+ engineers for top product company interviews across India.