MakeMyTrip interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

MakeMyTrip
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Coding Test - Pen and paper
Duration90 minutes
Interview date11 May 2015
Coding problem3

Questions on aptitude, English, logical reasoning, C/C++ and 5 coding ques. (only pseudo code).

1. Minimum Jumps

Moderate
25m average time
75% success
0/80
Asked in companies
WalmartDirectiMakeMyTrip

Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.

‘Arcade’ is a very famous mall in Berland. It has a very unique transportation method between shops. Since the shops in the mall are laying in a straight line, you can jump on a very advanced trampoline from the shop i, and land in any shop between (i) to (i + Arr[i]), where Arr[i] is a constant given for each shop.

There are N shops in the mall, numbered from 0 to N-1. Bob's wife starts her shopping journey from shop 0 and ends it in shop N-1. As the mall is very crowded on Fridays, unfortunately, Bob gets lost from his wife. So he wants to know, what is the minimum number of trampoline jumps from shop 0 he has to make in order to reach shop N-1 and see his wife again. If it is impossible to reach the last shop, return -1.

Problem approach

It can be solved by using mathematics. If the height of wall is less than or equal to x, only one jump is required. Otherwise run a while loop while height is greater than x, and calculate the jumps required by updating the height to height of wall – (climb up-climb down).

Try solving now

2. Smallest Window

Moderate
10m average time
90% success
0/80
Asked in companies
ArcesiumReliance Jio Infocomm LtdGoldman Sachs

You are given two strings S and X containing random characters. Your task is to find the smallest substring in S which contains all the characters present in X.

Example:

Let S = “abdd” and X = “bd”.

The windows in S which contain all the characters in X are: 'abdd', 'abd', 'bdd', 'bd'. 
Out of these, the smallest substring in S which contains all the characters present in X is 'bd'. 
All the other substring have a length larger than 'bd'.
Problem approach

The naïve approach is to generate all substrings of string1 and for each substring, check whether the substring contains all characters of string2. Finally, print the smallest substring containing all characters of string2.

The efficient solution is to use hashing. First check if the length of the string is less than the length of the given pattern, if yes then no such window can exist . Next, store the occurrence of characters of the given pattern in a array, say h_pat[]. Now use two pointer technique :
1. Start matching the characters of pattern with the characters of string , keep incrementing count if a character matches.
2. Check if (count == length of pattern string), if it matches then this means a window is found.
3. If such a window is found, try to minimize it by removing extra characters from the beginning of the current window.
4. Delete one character from first and again find this deleted key at right, once found apply step 2.
5. Update minimum length.
At last, print the minimum length window.

Try solving now

3. Rat In A Maze

Easy
15m average time
85% success
0/40
Asked in companies
OlaIBMGoldman Sachs

You are given a starting position for a rat which is stuck in a maze at an initial point (0, 0) (the maze can be thought of as a 2-dimensional plane). The maze would be given in the form of a square matrix of order 'N' * 'N' where the cells with value 0 represent the maze’s blocked locations while value 1 is the open/available path that the rat can take to reach its destination. The rat's destination is at ('N' - 1, 'N' - 1). Your task is to find all the possible paths that the rat can take to reach from source to destination in the maze. The possible directions that it can take to move in the maze are 'U'(up) i.e. (x, y - 1) , 'D'(down) i.e. (x, y + 1) , 'L' (left) i.e. (x - 1, y), 'R' (right) i.e. (x + 1, y).

Note:
Here, sorted paths mean that the expected output should be in alphabetical order.
For Example:
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1 
Expected Output:
DDRDRR DRDDRR 
i.e. Path-1: DDRDRR and Path-2: DRDDRR

The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.
Problem approach

Steps: 
1. Start from the cell[0,0] and look for the valid moves through the adjacent cells in the order Down->Left->Right->Up in the grid.
2. If the move is possible, then move to that cell while storing the character corresponding to the move(D,L,R,U) and again start looking for the valid move until the last cell [n-1,n-1] is reached.
3. Along with it, keep on marking the cells as visited and when all the paths possible are traversed from that cell, then unmark that cell for other different paths and remove the character from the path formed.
4. As soon as the last index [n-1,n-1] of the grid is reached, store the traversed path.

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date11 May 2015
Coding problem3

Questions based on OOPS were asked in this round.

1. OOPS Question

What is a virtual function?

Problem approach

A C++ virtual function is a member function in the base class that you redefine in a derived class. It is declared using the virtual keyword. It is used to tell the compiler to perform dynamic linkage or late binding on the function. A 'virtual' is a keyword preceding the normal declaration of a function. When the function is made virtual, C++ determines which function is to be invoked at the runtime based on the type of the object pointed by the base class pointer.

2. OOPS Question

What are the types of polymorphism?

Problem approach

Polymorphism is of two types :
1. Compile Time Polymorphism : 
Invokes the overloaded functions by matching the number and type of arguments. The information is present during compile-time. This means the C++ compiler will select the right function at compile time. It is achieved through function overloading and operator overloading.
2. Run Time Polymorphism : 
This happens when an object’s method is called during runtime rather than during compile time. Runtime polymorphism is achieved through function overriding. The function to be called is established during runtime.

3. OOPS Question

Difference between deep copy and shallow copy

Problem approach

A shallow copy of a collection is a copy of the collection structure, not the elements. With a shallow copy, two collections now share the individual elements.
Deep copies duplicate everything. A deep copy of a collection is two collections with all of the elements in the original collection duplicated.

03
Round
Easy
HR Round
Duration30 minutes
Interview date11 May 2015
Coding problem1

HR round with typical behavioral problems.

1. Basic HR Questions

1. Questions on strengths, weakness and hobbies.
2. What you know about their company apart from ppt ?
3. Discussion on my projects

Problem approach

Make sure you study their website inside-out before you go for interviews, this shows your passion to work for their company. Be yourself.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by MakeMyTrip
1175 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 13 problems
Interviewed by MakeMyTrip
1443 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by MakeMyTrip
849 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by MakeMyTrip
701 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes