makemytrip logo
MakeMyTrip· SDE 2

MakeMyTrip | SDE 2 | Gurgaon | March 2021 {Reject}

Result
Rejected
Location
Gurgaon
Posted
19 Mar 2021
333 reads

Summary

I interviewed for an SDE 2 position at MakeMyTrip in Gurgaon and was rejected after the second round, primarily due to the design challenges.

How it went

I received a call from a recruiter regarding an SDE 2 opening at MakeMyTrip in Gurgaon.

First Round:

The first round focused heavily on Java. The interviewer asked about my comfort level with Java and then dove into basic questions like 'Why is main declared as static?'. Since I mentioned using Java 8, we discussed new features such as lambdas, why they're useful, the Stream API, and collectors. I was also asked to write a program to calculate the sum of numbers in an array using Java. The interviewer was clearly a Java enthusiast!

Following the Java questions, we moved to data structures and algorithms. I was given two problems:

  1. Next Greater Element
  2. Modify an array into zig-zag order. For example, given {19, 27, 32, 43, 5, 6}, transform it to {27, 19, 43, 5, 32, 6}.
I was able to solve both questions easily, which allowed me to proceed to the next round.

Second Round:

This round focused more on design.
  1. The first problem was to design a Multi-level Parking Lot, starting with Low-Level Design (LLD) and then moving to High-Level Design (HLD). We delved deep into classes and database schema, with the interviewer asking many follow-up questions. This round felt average; the interviewer seemed to be in a rush and was looking for on-the-spot solutions rather than a detailed explanation of my thought process.
  2. Next, I was given a problem from a cricket match scenario: 'Given a target to chase, while you can score only 1s or 2s, count how many ways are there with which you can chase the target.' This is a classic Staircase Problem variant. I explained both a recursive and a dynamic programming solution thoroughly.
  3. The final question was to design an LRU-LFU cache. The eviction policy was specific: first, choose the least frequently used element, but if there are multiple with the same minimum frequency, then choose the least recently used one. I explained the LLD well, but struggled a bit with the HLD, particularly the database schema. I initially thought of using multiple tables, but the interviewer later pointed out that it could be done with a single table (key, value, frequency, last accessed at).
After this round, HR informed me that I was rejected, primarily due to the design aspects of the second round.

Questions asked (8)

  1. 01

    Java: Why `main` is static?

    Other

    Explain why the main method in Java is declared as static.

  2. 02

    Java 8 Features & Concepts

    Other

    Discuss new features introduced in Java 8, specifically focusing on lambdas (why they are used), the Stream API, and Collectors.

  3. 03

    Sum of Array Elements in Java

    Data Structures & Algorithms · Easy

    Write a program in Java to calculate the sum of all numbers in an array.

  4. 04

    Next Greater Element

    Data Structures & Algorithms · Medium

    Find the next greater element for each element in an array. For example, if the input is [4, 5, 2, 25], a possible output would be [5, 25, 25, -1].

    Open the problem
  5. 05

    Convert Array to Zig-Zag Pattern

    Data Structures & Algorithms · Medium

    Given an array of distinct elements, rearrange the elements in zig-zag fashion. That is, arr[0] < arr[1] > arr[2] < arr[3] > arr[4] < arr[5] .... Example: Input: {19, 27, 32, 43, 5, 6} Output: {27, 19, 43, 5, 32, 6}.

  6. 06

    Design Multi-Level Parking Lot

    System Design · Hard

    Design a multi-level parking lot system. Focus on both Low-Level Design (LLD) covering classes and their interactions, and High-Level Design (HLD) including database schema and overall architecture. Be prepared for in-depth follow-up questions.

  7. 07

    Cricket Score Combinations (Staircase Problem)

    Data Structures & Algorithms · Easy

    In a cricket match, a team needs to chase a given target score. Players can only score 1s or 2s. Count the total number of distinct ways in which the team can achieve the target score. (This is a variation of the classic staircase problem).

    Open the problem
  8. 08

    Design LRU-LFU Cache with Custom Eviction

    System Design · Hard

    Design an LRU-LFU cache. The eviction policy is as follows: first, choose the least frequently used element to remove. If there are multiple elements with the same minimum frequency, then choose the least recently used among them. Provide both Low-Level Design (LLD) and High-Level Design (HLD).

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at MakeMyTrip recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!