Amazon-Style Machine Coding Round: Format, Tips & Practice Problems
Written and reviewed by Sahil Srivastav
Amazon India runs coding rounds that reward code you can defend, not slides. For backend SDE1 and SDE2 roles the working-session round increasingly looks like a machine coding round: a scoped problem — usually a slice of commerce or operations — that you must turn into a running module inside a fixed window, then walk through against the interviewer’s edge cases.
The scenarios lean on the domains Amazon lives in at scale: inventory that must never oversell, returns and refunds that stay atomic, order and fulfilment state machines, and background jobs that run exactly once. This page breaks down the commonly reported shape of Amazon-style rounds, how they’re graded against Amazon’s bar-raiser instincts, and Gronex problems in the same style you can rehearse in a real repository.
What a Amazon-style machine coding round looks like
The typical shape is 60–120 minutes, solo, on your own machine or a shared editor. You get a written problem — an operational slice like a stock-reservation flow, a returns pipeline, or an order tracker — with functional requirements and a short list of explicit edge cases. You produce a small, working service: real entities, real state, runnable end to end.
Amazon rounds famously probe scale and failure even when the code is small. Expect "what happens under a thousand concurrent buyers", "what if this job runs twice", "what if the refund half-completes" — the interviewer is checking whether your model survives the operating conditions Amazon actually runs in, not just the happy path.
The follow-up almost always changes a requirement live — a new fulfilment state, a second refund path, a priority tier on the job queue. Extensibility is graded in the room, which is why hard-coded branching that passes the initial spec still loses points against the bar.
How you’re evaluated
A running demo
The gate. Requirements implemented and the main flow executable without a crash while the interviewer drives your code.
Correctness at scale
Oversell under concurrent purchases, double-executed jobs, and half-completed refunds — Amazon interviewers reach for exactly these and expect your invariants to hold.
Operational thinking
Idempotency, retries, and exactly-once semantics treated as first-class, because that is what running a service at Amazon scale demands.
Extensibility under change
When a new state or rule lands at minute 70, interfaces and clean seams survive; nested switch-statements get rewritten and cost you time.
Common mistakes that fail this round
- Building a perfect design doc and reaching the demo with nothing runnable — the round grades working code first.
- Treating concurrency and retries as out of scope when the domain is inventory, payments, or jobs — that is the actual problem.
- Ignoring idempotency so a retried request double-books stock or double-refunds money.
- Hard-coding the first fulfilment or refund rule so the inevitable "add one more" extension forces a rewrite.
- Skipping input validation on quantities, unknown SKUs, and duplicate requests — the first things an Amazon interviewer probes.
Quick tips for the room
- Get an end-to-end skeleton running in the first 30 minutes, then iterate.
- State your assumptions out loud and pin them at the top of the README.
- Make every money and stock mutation small, atomic, and idempotent from the start.
- Keep a two-minute buffer to rehearse the demo before you present it.
How to prepare
Practise the loop, not the trivia: take a scoped commerce or operations problem, set a 90-minute timer, and drive it to a runnable demo with a couple of edge cases handled. Amazon rewards a complete, defensible core over a half-built grand design every time.
The Gronex problems below mirror the format from the other side — each is a real backend repository with a failing test suite, so you rehearse reading code, fixing service logic, and making tests green under time pressure. Start with the free ones, then use the HARD concurrency and exactly-once problems to pressure-test yourself.
Practice problems in the Amazon-style round format
Each is a real backend repository with a failing test suite — the same working-code standard the round applies. Open the brief and read the full problem, no signup required.
Flash Sale Inventory Purchase System
The oversell problem at scale: sell exactly the stock you have when thousands of buyers race the same SKU.
Open the challenge →Warranty RMA Return Authorization
Returns done right: warranty-window checks, non-skippable state transitions, and atomic refund-plus-restock.
Open the challenge →Distributed Job Scheduler (Singleton Execution)
Exactly-once background execution: a scheduled job that must run on one worker even when many pick it up.
Open the challenge →E-Commerce Coupon Application Engine
Coupon eligibility, stacking rules, and idempotent redemption in a checkout backend.
Open the challenge →Loyalty Points and Tier Management
FIFO point expiry, oldest-first redemption, tier recalculation, and idempotent earn events. Free to try.
Open the challenge →Seat Reservation System
Inventory holds as a state machine: reserve, cancel, and list availability deterministically. Free to try.
Open the challenge →FAQ
Does Amazon actually run a machine coding round?
Amazon’s backend loops increasingly include a working-session round graded on runnable code and live edge-case discussion, in the same spirit as a machine coding round. These are Gronex originals in that style — we never republish any company’s actual interview questions, and Gronex is not affiliated with Amazon.
Were these problems actually asked at Amazon?
No. Every problem here is a Gronex original built in the same style — commerce and operations domains, working-code grading, scale-and-failure edge cases. Gronex is not affiliated with Amazon.
Which language should I practise in?
The one you’ll interview in. Gronex repositories run the same test suites in Java, Python, and C++, so you rehearse the same invariants in your strongest language.
Related
Gronex is not affiliated with, endorsed by, or sponsored by Amazon. All company names and trademarks belong to their respective owners. The problems on this page are Gronex originals written in the style of such interview rounds — not actual interview questions from Amazon.