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

Senior QA Engineer

MakeMyTrip
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 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: Referral
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
Easy
Online Coding Test
Duration60 minutes
Interview date16 Dec 2019
Coding problem2

This was a written test with 2 coding problems.

1. Combination Sum

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

You are given an array 'ARR' of 'N' distinct positive integers. You are also given a non-negative integer 'B'.


Your task is to return all unique combinations in the array whose sum equals 'B'. A number can be chosen any number of times from the array 'ARR'.


Elements in each combination must be in non-decreasing order.


For example:
Let the array 'ARR' be [1, 2, 3] and 'B' = 5. Then all possible valid combinations are-

(1, 1, 1, 1, 1)
(1, 1, 1, 2)
(1, 1, 3)
(1, 2, 2)
(2, 3)
Problem approach

This problem can be solved using recursion. 
Steps : 
1. Sort the array in increasing order.
2. Next, remove all the duplicates from array.
3. Now, use recursion and backtracking 
(A) If at any time sub-problem sum == 0 then insert that array to the result. 
(B) Else if sum < 0 then ignore and return.
(C) Else insert the present index in that array to the current vector and call the function with sum = sum-arr[index] and index = index, then pop that element from current index (backtrack) and call the function with sum = sum and index = index+1

Try solving now

2. Next Greater Number

Moderate
15m average time
90% success
0/80
Asked in companies
AmazonMorgan StanleySamsung

You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of digits as of the original number i.e the frequency of each digit from 0 to 9 should be exactly the same as in the original number.

For example:
If the given string is 56789, then the next greater number is 56798. Note that although 56790 is also greater than the given number it contains 1 '0' which is not in the original number and also it does not contain the digit '8'.

Note:

The given string is non-empty.

If the answer does not exist, then return -1.

The given number does not contain any leading zeros.
Problem approach

Observations:
1. If all digits are sorted in descending order, then output is always “Not Possible”. 
2. If all digits are sorted in ascending order, then we need to swap last two digits. 
3. For other cases, we need to process the number from rightmost side to find the smallest of all greater numbers. 

Steps:
1. Traverse the given number from rightmost digit, keep traversing till you find a digit which is smaller than the previously traversed digit. If no such digit is found, then output is “Not Possible”.
2. Now search the right side of above found digit ‘d’ for the smallest digit greater than ‘d’. 
3. Swap the above found two digits.
4. Now sort all digits from position next to ‘d’ to the end of number. The number that we get after sorting is the required output.

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
Software Developer
3 rounds | 9 problems
Interviewed by MakeMyTrip
1601 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 13 problems
Interviewed by MakeMyTrip
1493 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by MakeMyTrip
1180 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by MakeMyTrip
846 views
0 comments
0 upvotes