# The Machine Coding Round

> Prepare for 90-120 minute rounds where you build a working, extensible, tested application from a problem statement under time pressure. Free notes, key...

Canonical: https://www.internhack.in/roadmaps/tracks/cs-fundamentals/machine-coding-round
Last updated: 2026-11-28

Prepare for 90-120 minute rounds where you build a working, extensible, tested application from a problem statement under time pressure.

Advanced · about 12 hours · difficulty 4/5

Learn first: [Classic LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-classic-case-studies)

Machine coding rounds (common at Flipkart, Swiggy, Uber, PhonePe, Razorpay, Atlassian and many startups) give you a problem statement and 90-120 minutes to produce **working code**, followed by a review of your design and a live extension.

### What they grade

- **It runs**: the required commands or APIs work on the sample input. A half-finished "perfect" design scores worse than a simple working one.
- **Modularity**: separate models, services and a thin driver or CLI. No logic in `main`.
- **Extensibility**: new requirements (announced during review) can be added in minutes.
- **Readability**: meaningful names, small methods, no copy-paste.
- **Edge cases and errors**: invalid input handled gracefully with clear messages.
- **Tests** are a strong bonus, even a few.

### A time plan for 90 minutes

- 10 minutes: read, clarify, list entities and commands.
- 10 minutes: sketch classes and interfaces on paper.
- 50 minutes: implement the core flow first, then secondary features.
- 10 minutes: edge cases, error handling, a couple of tests.
- 10 minutes: clean up and prepare to explain.

### Practical tips

- Use **in-memory storage** (maps and lists) behind a repository interface unless told otherwise.
- Keep a personal skeleton ready in your language: package layout, a command parser, a custom exception class.
- Avoid frameworks unless required; they cost setup time.
- Commit or save progress in stages so you always have something runnable.
- Practise with real prompts: a snake and ladder game, a parking lot with commands, a Splitwise CLI, a meeting room scheduler, an inventory management system.

Good enough to move on: you have completed at least five timed machine coding problems end to end, each running correctly and able to take one new requirement in under ten minutes.

## Key concepts

- **Reading the prompt and scoping**
- **Project layout: models, services, driver**
- **In-memory repositories**
- **Time management**
- **Error handling and validation**
- **Writing quick unit tests**
- **Handling live extensions**

## Mini project

Do five timed 90-minute machine coding sessions (meeting room scheduler, Splitwise CLI, snake and ladder, inventory manager, parking lot with commands). After each, have a friend add one surprise requirement and record how long the change took.

## Check yourself

At minute 60 of 90 your design is elegant but only half the commands work. What do you do in the remaining 30 minutes and why?

## Free resources

- [awesome-low-level-design (machine coding problems)](https://github.com/ashishps1/awesome-low-level-design) (GitHub)
- [Refactoring Guru: Refactoring](https://refactoring.guru/refactoring) (Refactoring Guru)

Previous: [Advanced LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-advanced-case-studies) · Next: [Scalability, Latency and Back-of-the-Envelope Estimates](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/scalability-basics)

## More in Low-Level Design

- [How to Approach an LLD Interview](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-approach)
- [Classic LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-classic-case-studies)
- [Advanced LLD Case Studies](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/lld-advanced-case-studies)
- [The Machine Coding Round](https://www.internhack.in/roadmaps/tracks/cs-fundamentals/machine-coding-round)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [CS Fundamentals and Placement Prep Roadmap](https://www.internhack.in/roadmaps/tracks/cs-fundamentals)
