In this article
  1. Start here: the learning path
  2. How does a machine coding round work?
  3. What do the four levels test?
  4. How do you spend the time?
  5. Design the interface before the code
  6. Test time with a fake clock
  7. Iterators and nested structures
  8. The LRU cache
  9. Concurrency and production follow-ups
  10. Working with AI tools in a coding round
  11. Questions interviewers ask on machine coding rounds
  12. All 24 guides in Machine coding rounds
  13. Follow-up questions
  14. Sources
Machine coding round
A machine coding round is a timed coding interview in which you build a small, working program from written requirements, usually a few classes with a clear interface, so the grade rests on correctness, structure and extensibility as well as on finding an algorithm.
Level
A level is one stage of CodeSignal's multi-stage format, in which new methods and entities are added to the same project while the contracts of the methods already written (their names, inputs and outputs) stay as they were.
Backward compatibility
Backward compatibility is the property that code written for an earlier requirement keeps working unchanged when a later requirement is added, so old tests keep passing.
Fake clock
A fake clock is a stand-in for the system clock that a test controls, so time-dependent code can be checked at an exact instant without waiting.

Start here: the learning path

This machine coding rounds guide starts with how a machine coding round works, because every later topic assumes its vocabulary. The topics then run from interface design and iterators over nested lists to the least recently used (LRU) cache and a full multi-level exercise, and the sections further down cover testing time and the production follow-ups.

  1. Low level design interview questions on principles, patterns and thread safety
  2. Nested list weight sum: DFS, BFS, iterators and inverse weights
  3. LRU cache implementation in Python
  4. The CodeSignal in-memory database assessment, level by level
  5. Aligned malloc implementation in C: how it works
  6. TTL caches and time-based key-value stores: expiry and timestamps, step by step
  7. How do spreadsheet and dependency engines work, step by step?
  8. Event and log processing problems, step by step: per-key state, sorts and heaps
  9. Profiler and stack trace coding problems explained
  10. How to implement the circuit breaker pattern in code
  11. How do serialization and parsers work?
  12. How to build a job scheduler in code
  13. Implement an order book and price-time matching engine in Python
  14. Object-oriented game simulations, step by step: an airport example
  15. How do you refactor and extend existing code under tests?
  16. The web crawler coding question, step by step
  17. Build-something rounds: a coding interview walkthrough
  18. What is file-system flavoured coding, and how do you solve it?
  19. How do you implement the containers you usually import?
  20. How do you handle concurrency in a coding interview?
  21. How do you build a calculator and tokenizer in a coding interview?

Other problem families worth practising

Time to live (TTL) caches and time-based key-value stores, a rate limiter with a circuit breaker, and file-system flavoured coding follow the same pattern as the problems on this page: a small interface, a fixed set of rules and, in CodeSignal's multi-level format, a new requirement that arrives mid-round. A time to live cache stores each value with an expiry instant and checks it on every read.

A rate limiter keeps a window of recent request times and refuses a call once the window is full, and a circuit breaker stops calling a failing dependency for a cooling-off period. A file-system problem is a tree of directories and files with a path as the key, and the first decision is how a path is split and resolved.

How does a machine coding round work?

A machine coding round gives you a written problem, a small system such as a cache or a booking service, and asks for a working, extensible program in a fixed time, graded on correctness, structure and how easily it takes a new requirement. Two formats are prepared for under this name.

CodeSignal's Industry Coding Framework datasheet describes its version as "a progressive evaluation that follows one project and builds in complexity over 4 levels", with a "90 minute duration" and results that are "automatically scored" (CodeSignal datasheet, read October 2026). Flipkart's round, as the workattech preparation repository describes it, is "designing and coding a clean, modular and extensible solution based on a specific set of requirements", with 15 minutes before coding, 90 minutes of coding and 15 minutes after, an interviewer who "might have 1 or 2 checkpoints", and a demo and code review at the end (workattech, read October 2026).

The two formats share a 90-minute build and differ in how requirements arrive and who grades.
CodeSignal Industry Coding FrameworkFlipkart's round (workattech)
RequirementsOne project, built across 4 levelsA specific set of requirements, with checkpoints
Time90 minutes15 + 90 + 15 minutes
GradingAutomatically scoredHygiene, correctness, error handling, extensibility; demo and code review

Ask your recruiter which kind you will get.

Map of machine coding preparation: the two formats and the topics around themMap with the machine coding round at the centre. Six boxes surround it: the two formats, interface design, testing time, iterators and caches, concurrency, and AI tools.Machinecodingbuild to a specThe formattwo formatsInterfacesdesign firstTesting timefake clockIterators,cachesnested lists,LRU cacheConcurrencylocks,follow-upsAI toolscheck the policyDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/industry-coding/
The two formats, the habits that keep earlier work passing, and the problem families around them.CC BY 4.0 — source: Machine coding rounds: the complete guide to industry coding
Text description of the diagram
  • A machine coding round is a timed build of a small, working, extensible program.
  • Graded on correctness, structure and how easily it takes a new requirement.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

What do the four levels test?

In CodeSignal's format, the four levels test, in order, basic implementation, reuse with new requirements, advanced features without breaking old ones, and a final extension with refactoring. The datasheet says level one assesses "general ability to implement basic code in a class and cover all corner cases"; level two, the ability "to reuse implementations from the first level while adding new requirements"; level three, supporting advanced features while "maintaining backward compatibility"; and level four, the ability to "enhance existing functionality without regressions" (breaking something that used to work), with code design assessed after the fact.

The technical brief states the mechanism: "At each level, new methods and entities are introduced while retaining the integrity of previously implemented method contracts" (CodeSignal technical brief, read October 2026). The framework does not ask for an advanced algorithm: the datasheet's lists for levels three and four say "without advanced algorithms" and "without algorithms". What it grades is whether your first level was written so that the fourth is easy.

CodeSignal's four levels build on one project, so level one must survive level fourLayer stack, top to bottom: level four refactors without regressions, level three adds advanced features with backward compatibility, level two reuses and aggregates, and level one is basic implementation.Level fourrefactor, no regressionsLevel threeadvanced, compatibleLevel tworeuse, new requirementsLevel onebasic code, corner casesDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/industry-coding/
Each level builds on the one below, so code written for level one must survive level four.CC BY 4.0 — source: Machine coding rounds: the complete guide to industry coding
Text description of the diagram
  • Level one assesses general ability to implement basic code in a class and cover all corner cases (CodeSignal datasheet).
  • Level four assesses the ability to enhance existing functionality without regressions (CodeSignal datasheet).

How do you spend the time?

In CodeSignal's format, the brief publishes typical minutes per level, and they add up to 90 to 165 minutes, so only the fastest typical pace on every level fits inside the 90-minute limit. Candidates are "not necessarily expected to complete all tasks", and "a major factor" is "how far they can progress within the given time frame". Scores "range from 200 to 600", and partial credit counts (brief).

The typical minutes per level sum to 90 to 165 minutes against a 90-minute limit, so finishing every level is not expected.
LevelTypical minutes (brief)Lines of code, cumulative (brief)
110 to 1515 to 20
220 to 3030 to 45
330 to 6090 to 130
430 to 60110 to 160

The sums are computed: 10 + 20 + 30 + 30 is 90 and 15 + 30 + 60 + 60 is 165.1 A level that is almost right costs you twice, once now and again when a later requirement exposes it, so correctness at each level beats a rushed start on the next.

As advice and not a published rule: read each level first, write the signatures before the bodies, then run the examples. The full exercise is on the CodeSignal in-memory database page. In Flipkart's format, use the 15 minutes before coding to agree the entities, and leave time for the demo.

Design the interface before the code

A machine coding round rewards an interface that stays stable while the behaviour behind it grows. Choose method names and return values at the start that a later requirement can extend without renaming. Low-level design (LLD) questions test the same habit, and a machine coding round is LLD written as running code. A representational state transfer (REST) API (a Hypertext Transfer Protocol (HTTP) interface) is rarely the ask; the class interface is what is graded.

The low-level design interview questions page answers twenty such questions, from the single responsibility principle to thread safety. Its rule applies here: give each class one reason to change, and pass collaborators (the other objects a class uses) in. Martin Fowler's article on dependency injection describes the pattern as having a separate object populate the field that holds a collaborator, which is exactly what lets a test supply a fake (Fowler, 2004).

Test time with a fake clock

When the statement passes a timestamp, use it and never read the system clock: CodeSignal's example task has FILE_GET_AT(timestamp, file_name), and the brief says "do not change the existing method signatures". When you design the interface yourself, as in a human-run round, pass in a clock object, so that a test can move time to an exact instant with no waiting.

The reason is in the language documentation. Python's time.time() "can return a lower value than a previous call if the system clock has been set back", while time.monotonic() is "a clock that cannot go backwards" and is "not affected by system clock updates" (Python documentation, read October 2026). For durations, a monotonic reading is the safe real clock; for tests, pass a fake one. The boundary rule to state is that a value is alive while t is less than set time plus ttl. We ran a small store with a ten-second expiry against a fake clock: the value was present at 9.999 seconds, gone at 10 seconds, and the unexpiring key stayed (assets/data/fake-clock.py, output saved).

class FakeClock:
    def __init__(self, start=0.0): self.t = start
    def now(self): return self.t
    def advance(self, seconds): self.t += seconds

The class holds one number and lets the test move it. Use integer ticks where you can: ten advances of a tenth of a second each sum to 0.9999999999999999 in the same illustrative run (assets/data/fake-clock.json), which misses a boundary at 1.0.

Iterators and nested structures

Iterator problems ask you to walk a structure one element at a time without flattening it in one pass, and they test interface design under changing requirements. A nested list, where an element is either a number or another list, is the standard case.

The first version often uses recursion; the follow-up asks for a version that can pause and resume, usually built on an explicit stack of iterators (a generator keeps that stack for you). The nested list weight sum page shows both and the depth-counting trap that changes the answer from 10 to 4. For the structure behind most early work, revise hash tables, maps and sets; a hash table is a structure that finds a value from its key in one step on average.

The LRU cache

The LRU cache is the standard problem for a cache with a size limit. It asks for get and put in constant time, and when the cache is full the entry untouched for longest is evicted. The usual design pairs a hash map, which finds an entry in one step, with a doubly linked list, which keeps the entries in recency order and moves one in a constant number of pointer writes.

The bug interviewers look for is forgetting to refresh an entry on get, so that a key you just read can be evicted next. The full code, a traced example and the follow-ups are on the LRU cache implementation page.

Concurrency and production follow-ups

Some rounds end with a production follow-up: make it safe to use from several threads, or explain how it would persist data. State what is shared, what protects it, and what that protection costs.

Locks, races and deadlock are the concurrency questions interviewers ask most in this form. For storage and scale, system design is the next topic. Offer these topics when the interviewer asks what next, not before the requirements pass. A common first step is one lock around the shared map, which is correct and easy to explain; finer locks are an optimisation to mention, not to build first.

Working with AI tools in a coding round

Policy on AI assistance in coding rounds differs by employer and by round, so confirm what is allowed before you start. Where tools are permitted, a sensible habit, offered as advice and not as a published rule, is to direct them in small steps and to be able to explain every line you keep. An AI-assisted coding round has its own format and errors, such as handing over the whole task at once. On the review side, expect code review questions. Whatever the policy, the working rules do not change: read the requirements, keep the interface stable and test the corner cases yourself. Classic algorithm rounds are a different format with their own preparation.

Questions interviewers ask on machine coding rounds

CodeSignal's own example task (read October 2026) is a file hosting service that grows from upload and get to prefix search, expiry with timestamps and rollback; the workattech repository (read October 2026) lists Snake and Ladder, Splitwise and Trello style problems. The ten prompts below are illustrative and in our own words, with a one-line answer for each: the core data structure and the first design decision. We make no claim about how often any prompt is asked.

Machine coding prompts mostly ask for a small system with a stable interface, so each answer names one core structure and one first decision.
Prompt (our wording)Core structure and first decision
Build an in-memory key-value store with a time to live.A map from key to (value, expiry); check expiry on read; take the time as an argument.
Build a simple banking system with accounts and transfers.A map of accounts; validate the balance and both accounts before a transfer; reject a transfer to the same account.
Model a small file system with paths and sizes.A tree of nodes keyed by path segment; decide first how a path is split and normalised.
Build a task manager where tasks contain subtasks.A task holds a list of child tasks; recursion for totals, with a guard against cycles.
Implement a rate limiter class.A queue of recent request times per caller; the clock is passed in so a test can move it.
Build a session manager that issues, renews and counts sessions.A map from session id to expiry; counting means ignoring expired entries.
Make an iterator over a nested list that can resume.An explicit stack of iterators, so the position survives between calls.
Add undo to a text editor.A stack of inverse operations or snapshots; undo pops and applies.
Extend your solution to support transactions.A stack of change logs, so commit merges and rollback discards.
Make your class safe for several threads.One lock around the shared state first; state what it protects.

The low-level design questions page has more of the same kind.

Follow-up questions

What is a machine coding round?

A machine coding round is a timed interview in which you build a small, working, extensible program from written requirements. The grade covers correctness, structure and how easily the code takes a new requirement. CodeSignal's version delivers the requirements in four levels over 90 minutes; Flipkart's version, as workattech describes it, adds a demo and a code review. The section on how a round works compares the two.

How do I split 90 minutes across four levels?

CodeSignal's technical brief gives typical minutes of 10 to 15, 20 to 30, 30 to 60 and 30 to 60 for levels one to four. They sum to 90 to 165 minutes against a 90-minute limit, so plan to finish the early levels cleanly and treat the last as a stretch. The full exercise is on the CodeSignal in-memory database page.

Should I write my own tests?

Use the checks the task gives you first. The brief's example says "press 'Submit' often", because partial credit is granted for each test passed. Write your own small checks for the corner cases the statement names, and keep them quick. The low-level design questions page covers the interface habits that make small checks easy to write.

What if I only finish level two?

That still scores. The brief says candidates are "not necessarily expected to complete all tasks", that scores run from 200 to 600, and that partial credit counts. A clean level two is better than a broken level four. The CodeSignal in-memory database page shows what a clean level two looks like.

Key takeaways
  • A machine coding round is a timed build of a small program from written requirements, graded on correctness, structure and extensibility.
  • CodeSignal gives the requirements in four levels over 90 minutes; Flipkart's round, as workattech describes it, gives them together, then a demo and a code review.
  • The typical minutes per level sum to 90 to 165 minutes against a 90-minute limit, and partial credit counts, so finishing every level is not expected.
  • Design the interface first, and pass collaborators (the other objects a class uses) in so tests can fake them.
  • Use a timestamp the statement passes; fake the clock only when you design the interface.

Sources

  1. Industry Coding Framework datasheet — CodeSignal (document shows no date; read 2026-10-24), 24 Oct 2026
  2. Industry Coding Skills Evaluation Framework: Technical Brief — CodeSignal (document shows no date; read 2026-10-24), 24 Oct 2026
  3. flipkart-machine-coding-round — workat.tech (GitHub repository, undated; read 2026-10-24), 24 Oct 2026
  4. time, time access and conversions (Python 3.15 documentation) — Python Software Foundation (page shows version 3.15.1 only; read 2026-10-24), 24 Oct 2026
  5. Inversion of Control Containers and the Dependency Injection pattern — Martin Fowler, 23 Jan 2004