# The Machine Coding Round

> Prepare for the 90-120 minute machine coding round at Flipkart, Swiggy, Razorpay and similar companies: working, extensible code under time pressure. Free...

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

Prepare for the 90-120 minute machine coding round at Flipkart, Swiggy, Razorpay and similar companies: working, extensible code under time pressure.

Intermediate · about 10 hours · difficulty 3/5

Learn first: [LLD Case Study: Parking Lot](https://www.internhack.in/roadmaps/tracks/system-design/lld-parking-lot)

Many Indian product companies run a **machine coding round**: you get a problem statement (a cab booking service, a snake and ladder game, an in-memory key-value store, a meeting room scheduler) and 90 to 120 minutes to write **working, runnable code** that you then demo and explain.

### What evaluators look for

- **It runs** and handles the given test inputs. A beautiful design that does not run usually fails.
- **Modularity and extensibility**: separate models, services and the driver; adding a feature should not require a rewrite.
- **Clean code**: meaningful names, small methods, no copy-paste, sensible exceptions.
- **Correctness on edge cases**: invalid input, empty states, duplicates.
- Often **bonus requirements** (concurrency, a new feature) that reward a flexible design.

### A time plan for 90 minutes

1. 10 minutes: read carefully, list requirements, ask clarifying questions, sketch entities.
2. 50 minutes: code models, then services with interfaces, then a simple driver (main method or CLI). Keep it running at every step.
3. 15 minutes: edge cases, input validation, bonus features.
4. 10 minutes: tidy up, run through the sample inputs, prepare to explain.

### Practical habits

- Use **in-memory storage** behind a repository interface; do not set up a real database.
- Use the language you are fastest in; Java, Python, Go, C++ and TypeScript are all common.
- Prepare a mental skeleton: models, repositories, services, strategies, exceptions, driver.
- Practise with a timer on 10 to 15 classic problems: parking lot, Splitwise, snake and ladder, elevator, cab booking, in-memory cache with TTL and LRU, rate limiter, logger, library management, food ordering.

### Pitfalls

- Over-engineering early and not finishing.
- Everything in one file and one class.
- Not reading the input/output format and losing marks on demo.

You are ready to move on when you can finish two unseen machine coding problems in 90 minutes each with code that runs, passes the sample inputs and handles one new requirement with small changes.

## Key concepts

- **Reading and scoping the problem**
- **Working code first**
- **Models, services, repositories layout**
- **In-memory storage behind interfaces**
- **Time management**
- **Handling bonus requirements**
- **Snake and ladder, elevator, cab booking practice**

## Mini project

Do four timed 90-minute machine coding sessions (snake and ladder, in-memory LRU cache with TTL, meeting room scheduler, cab booking) and push each to GitHub with a README, sample input and output, and a note on what you would improve.

## Check yourself

With 20 minutes left and a bonus requirement unfinished, what do you prioritise, and why?

## Free resources

- [Awesome Low Level Design](https://github.com/ashishps1/awesome-low-level-design) (GitHub)
- [Flipkart Tech Blog](https://blog.flipkart.tech/) (Flipkart)
- [Refactoring.Guru](https://refactoring.guru/) (Refactoring.Guru)

Previous: [LLD Case Study: Expense Sharing (Splitwise)](https://www.internhack.in/roadmaps/tracks/system-design/lld-splitwise) · Next: [Design a URL Shortener (TinyURL, bit.ly)](https://www.internhack.in/roadmaps/tracks/system-design/case-url-shortener)

## More in Low-Level Design (LLD) and Object-Oriented Design

- [OOP Principles and SOLID](https://www.internhack.in/roadmaps/tracks/system-design/oop-and-solid)
- [Design Patterns for LLD](https://www.internhack.in/roadmaps/tracks/system-design/design-patterns)
- [Approaching an LLD Problem: Requirements, Entities and UML](https://www.internhack.in/roadmaps/tracks/system-design/lld-approach-and-uml)
- [LLD Case Study: Parking Lot](https://www.internhack.in/roadmaps/tracks/system-design/lld-parking-lot)
- [LLD Case Study: Movie Ticket Booking (BookMyShow)](https://www.internhack.in/roadmaps/tracks/system-design/lld-bookmyshow)
- [LLD Case Study: Expense Sharing (Splitwise)](https://www.internhack.in/roadmaps/tracks/system-design/lld-splitwise)
- [The Machine Coding Round](https://www.internhack.in/roadmaps/tracks/system-design/machine-coding-round)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [System Design Roadmap](https://www.internhack.in/roadmaps/tracks/system-design)
