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

makemytrip logo
makemytrip
SDE 2GurgaonRejected
March 19, 202138 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.

Full Experience

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.

Interview Questions (8)

Q1
Java: Why `main` is static?
Other

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

Q2
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.

Q3
Sum of Array Elements in Java
Data Structures & AlgorithmsEasy

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

Q4
Next Greater Element
Data Structures & AlgorithmsMedium

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].

Q5
Convert Array to Zig-Zag Pattern
Data Structures & AlgorithmsMedium

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}.

Q6
Design Multi-Level Parking Lot
System DesignHard

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.

Q7
Cricket Score Combinations (Staircase Problem)
Data Structures & AlgorithmsEasy

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).

Q8
Design LRU-LFU Cache with Custom Eviction
System DesignHard

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).

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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