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

SDE - 1

MakeMyTrip
upvote
share-icon
2 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2
Topics: Data Structures and Algorithms, Object-Oriented Programming System, Operating system, Database Management System
Tip
Tip

Try to do Data Structures and Algorithms based questions and firstly attempt it yourself before going to the solution, also try to do it as quickly as you can. Also prepare for theory subjects like Operating system, Database Management System, etc which I prepared through Coding Ninjas subjective notes and they are very accurate and up to mark.

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

Keep your resume simple and complete. Mention some good-level projects, your previous experiences, and coding achievements if any.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date27 Aug 2022
Coding problem2

1. Balanced Parentheses

Moderate
10m average time
90% success
0/80
Asked in companies
SalesforceAmazonMicrosoft

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.
Note :
Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

Try solving now

2. Find K Closest Elements

Moderate
15m average time
85% success
0/80
Asked in companies
OptumUberFacebook

You are given a sorted array 'A' of length 'N', two integers 'K' and 'X'. Your task is to print 'K' integers closest to 'X', if two integers are at the same distance return the smaller one.

The output should also be in sorted order

Note:
An integer 'a' is closer to 'X' than an integer 'b' if: 
|a - X| < |b - X|  or (  |a - X| == |b - X| and a < b )
For Example:
if X = 4,  3 is closer to 'X' than 9, as |3-4| < |9-4|  i.e., 1 < 5   and if X = 4, 2 and 6 are equally close to it, as |2-4| == |6-4| = 2, but we say 2 is closer to 4 than 6, as 2 is smaller.
Problem approach

You are given a sorted array 'A' of length 'N', two integers 'K' and 'X'. Your task is to print 'K' integers closest to 'X', if two integers are at the same distance return the smaller one.
The output should also be in sorted order
Note:
An integer 'a' is closer to 'X' than an integer 'b' if: 
|a - X| < |b - X| or ( |a - X| == |b - X| and a < b )

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date27 Aug 2022
Coding problem1

1. Find The Sum Of The Left Leaves

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

Given a binary tree with ‘root’. Your task is to find the sum of all the left leaf nodes.

Properties of leaf:-

In a binary tree, a leaf is a node such that it does not have any children. Node ‘1’ is always the root of the binary tree. Left leaves are those nodes that are the left child of their parent and a leaf node.

Example:
Let’s say you have a binary tree as follows:-

subsequence

Node 4 and Node 5 are leaf nodes and left child of their parent. Node 6 is a leaf node but not the left child of its parent node 3. Therefore return ‘4+5= 9’ as the answer.

Note:
You do not need to print anything; it has already been taken care of. Just implement the function.
Problem approach

Given a binary tree with ‘root’. Your task is to find the sum of all the left leaf nodes.
Properties of leaf:-
In a binary tree, a leaf is a node such that it does not have any children. Node ‘1’ is always the root of the binary tree. Left leaves are those nodes that are the left child of their parent and a leaf node

Try solving now

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by MakeMyTrip
1210 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 13 problems
Interviewed by MakeMyTrip
1494 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by MakeMyTrip
875 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by MakeMyTrip
727 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes