Practice
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Frontend UI Machine Coding
Resources
Career Advice and Roadmaps
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Backend Development
Frontend Development
Project Ideas for Software Developers
Core Computer Science
Companies
SDE Jobs & Internships
Interview Questions
Compare Companies
IDE
Online IDE
Collaborative IDE

Machine Coding Round Practice Questions for Interviews | Flipkart, Uber, Swiggy, Udaan, Gojek

Gaurav Chandak
Gaurav Chandak
Disclaimer: This article was written few years ago and may no longer be relevant as software engineering has changed a lot in the last few years. This is what may be more relevant now: Future of Software Engineering - Gaurav Chandak

Machine Coding Round Complete Guide

  • What is a Machine Coding Round?
  • How to prepare for Machine Coding Round?
  • How to clear the Machine Coding Round?
  • Machine Coding Round Interview Practice Questions
  • Machine Coding Round Interview Solutions/Editorials

Machine Coding Round Practice Questions for Interviews

We’ve created a few machine coding problems that you can practice to get prepared for the actual machine coding round interview of top tech companies like Flipkart, Uber, Swiggy, Udaan, Razorpay, Gojek.

Design Snake & Ladder

Create a snake and ladder application. The application should take as input (from the command line or a file):

  • Number of snakes (s) followed by s lines each containing 2 numbers denoting the head and tail positions of the snake.
  • Number of ladders (l) followed by l lines each containing 2 numbers denoting the start and end positions of the ladder.
  • Number of players (p) followed by p lines each containing a name.

>> Continue reading at "Design Snake And Ladder - Machine Coding Round Questions"


Design Splitwise

Create an expense sharing application.

An expense sharing application is where you can add your expenses and split it among different people. The app keeps balances between people as in who owes how much to whom.

>> Continue reading at "Design Splitwise - Machine Coding Round Questions"


Design Trello

Create a project management application (like Trello).

A project management application (like Trello) is where you can manage your project by tracking smaller tasks.

The app contains multiple boards to signify different projects

  • Each board contains different lists to signify sub-project
  • Each list contain different cards signifying smaller tasks
  • Each card can be assigned to a user or may remain unassigned

>> Continue reading at "Design Trello - Machine Coding Round Questions"


Design Tic-Tac-Toe

Create a command-line application for tic tac toe with the following rules:

  • The game is played between two players. One player owns the X pieces and can put it on any of the empty cells in the grid. The other player owns the O pieces and can in any of the empty cells.
  • The player with X makes the first turn. Each player plays alternately after that.
  • The first player to form a horizontal/vertical/diagonal sequence wins.

>> Continue reading at "Design Tic-Tac-Toe - Machine Coding Round Questions"


Design a Parking Lot

Create a command-line application for a parking lot.

A parking lot is an area where cars can be parked for a certain amount of time. A parking lot can have multiple floors with each floor having a different number of slots and each slot being suitable for different types of vehicles.

>> Continue reading at "Design a Parking Lot - Machine Coding Round Questions"


Design Chess Validator

Let's look at the game of Chess. Chess is a two-player strategy game played on an 8*8 checkered board.

Rules of the game

  • The game is played between two players. One player controls an army of white pieces and the other controls the army of black pieces.
  • Each army includes the following pieces: 1 King, 1 Queen, 2 Knights, 2 Rooks, 2 Bishops, 8 Pawns
  • Each piece has its own way of moving on the board.
  • A player may move only to an empty cell unless it is trying to capture a piece of the other player.
  • A piece is captured when a player moves to a position currently occupied by a piece of the opponent.
  • Each player needs to move a piece in each turn.
  • The game starts with the player owning the white pieces making the first move. After this, the players play alternate turns.
  • There are more rules but it is outside the scope of this problem.

>> Continue reading at "Design Chess Validator - Machine Coding Round Questions"


Design a Library Management System

A library management system is an automation system used to manage a library and the different resource management required in it like cataloging of books, allowing check out and return of books, invoicing, user management, etc.

For this problem, we have to design a library management system that can do a few of the above functionalities.

>> Continue reading at "Design a Library Management System - Machine Coding Round Questions"


Design 2048 Game

Let's look at a game named '2048'. The game has a 4x4 board.

The game starts with one or more random tiles at random positions.

According to play2048.co:

Join the tiles, get to 2048!

HOW TO PLAY: Use your arrow keys to move the tiles. Tiles with the same number merge into one when they touch. Add them up to reach 2048!

>> Continue reading at "Design 2048 Game - Machine Coding Round Questions"


Design an In-Memory Key-Value Store

Design an In-Memory Key-Value Store like Redis.

  • The key-value store will be in-memory and does not require access to the file system.
  • The key will always be a string.
  • The value would be an object/map. The object would have attributes and corresponding values.
  • Example => "sde_bootcamp": { "title": "SDE-Bootcamp", "price": 30000.00, "enrolled": false, "estimated_time": 30 }

>> Continue reading at "Design an In-Memory Key-Value Store - Machine Coding Round Questions"


Design a Distributed Queue

Design an In-Memory Distributed Queue like Kafka.

  • The queue should be in-memory and should not require access to the file system.
  • There can be multiple topics in the queue.
  • A (string) message can be published on a topic by a producer/publisher and consumers/subscribers can subscribe to the topic to receive the messages.
  • There can be multiple producers and consumers.

>> Continue reading at "Design a Distributed Queue - Machine Coding Round Questions"


This article will be updated as we create more problem statements. You can also find new practice problems at workat.tech machine coding practice section.

---

You can subscribe to our free WhatsApp newsletter to receive good content on programming, interview prep and job search by sending 'Subscribe' to +91 on WhatsApp.

Join our discord community to have healthy discussions on programming, interviews and job search.

Further reading:

  • How to prepare for the machine coding round?
  • What is a Machine Coding Round?
  • How to ace the machine coding round?
  • SDE I Interview Preparation: The Ultimate Guide
1
Gaurav Chandak
Gaurav Chandak
Gaurav is the co-founder of workat.tech and has previously worked at Flipkart and Microsoft. He intends to actively contribute to the future of education through workat.tech.
Related Content
What is a Machine Coding Round? - Interviews | Flipkart, Uber, Swiggy, Udaan
How to prepare for machine coding round? - Interviews | Flipkart, Uber, Swiggy, Udaan
SDE 1 Interview Preparation Roadmap for Product-Based Companies
SDE Bootcamp - Become a software engineer at a product-based company
Practice Machine Coding
Learning Resources
Interview Prep Resources
Blog
  • Career Advice and Roadmaps
  • Data Structures & Algorithms
  • Machine Coding Round (LLD)
  • System Design & Architecture
  • Backend Development
  • Frontend Development
  • Awesome Project Ideas
  • Core Computer Science
Practice Questions
  • Machine Coding (LLD) Questions
  • System Design (HLD) Questions
  • Topic-wise DSA Questions
  • Company-wise DSA Questions
  • DSA Sheets (Curated Lists)
  • JavaScript Interview Questions
  • Frontend UI Machine Coding Questions
Online Compilers (IDE)
  • Online Java Compiler
  • Online C++ Compiler
  • Online C Compiler
  • Online Python Compiler
  • Online JavaScript Compiler
Topic-wise Problems
  • Dynamic Programming Interview Questions
  • Linked List Interview Questions
  • Graph Interview Questions
  • Backtracking Interview Questions
  • Arrays Interview Questions
  • Trees Interview Questions
Company-wise Problems
  • Amazon Interview Questions
  • Microsoft Interview Questions
  • Google Interview Questions
  • Flipkart Interview Questions
  • Adobe Interview Questions
  • Facebook Interview Questions
DSA Sheets (Curated Lists)
  • Top Interview Questions
  • FAANG Interview Questions
  • Most Asked Interview Questions
  • 6 month DSA Practice Sheet
  • 3 month DSA Practice Sheet
  • Last minute DSA Practice Sheet