MakeMyTrip Coding Questions

Make My Trip Coding Questions 2023

Make My Trip Coding Questions is the part of Programming Assessment which is an Online Test. The level of these questions is exceptionally hard. Hence one needs to practice hard to clear these questions.

On this page you will find everything related to make my trip coding questions. You can even look for section bifurcation, eligibility criteria, salary breakdown on this page.

Make My Trip Coding Questions

About MakeMyTrip

In 2000, MakeMyTrip, an online travel agency based in India, was established. It’s a business with its corporate office in Gurugram, Haryana.

The business offers a variety of travel-related services online, including airline tickets, domestic and foreign vacation packages, hotel bookings, and rail and bus tickets.

Prime Course Trailer

MakeMyTrip Eligibility Criteria

Here are some of the pointers which one need to keep in mind before you apply for the MMT recruitment drive. Check your eligibility once before applying.

  • A CGPA of 7.0 throughout B.Tech
  • No active backlogs
  • CSE and IT students only applicable

MakeMyTrip Online Assessment

Make My Trip conducts its hiring via the HackerEarth platform. The online assessment is of 90 minutes and includes two sections:-
  • Programming MCQs
  • Coding
MakeMyTrip Number of Questions Time Diifficulty
Programming MCQs 20 90 mins (Shared) Hard
Coding 2 90 mins (Shared) Hard

Analysis of Make My Trip Exam

  1. No. of Questions: 22
  2. Time Allotted : 90 mins
  3. Difficulty : High

Related Banners

MakeMyTrip Salary Breakdown

The salary package as a full-time employee will be Rs 25.5 Lakhs. Salary Breakdown:-
MakeMyTrip Salary Breakdown
Fixed Component Rs 13 Lakhs
Retention Bonus Rs 1.5 Lakhs
Joining Bonus Rs 1 Lakh
RSUs Rs 10 Lakhs

At the time of Internship

  • Before being converted into full-time employees, there will be an internship period.
  • The stipend during the internship will Rs 35,000.

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

MakeMyTrip Coding Questions

Question 1 : Choco and chocolate

Problem Statement :

Choco, a chocolate lover, has N amount of money with him. He wants to buy as much chocolate as possible. So, he goes to a chocolate shop “Bandyman ”. Mike, the owner of “Bandyman ” has different types of chocolate in his store (represented by a character) placed in a row.

Mike, give an offer to Choco that he can buy a selected type of chocolate for free and need to pay for the other types of chocolates and Choco can only buy consecutive chocolates.

Now, you need to write a code to find the maximum amount of chocolates Choco can get by selecting the chocolates optimally.

Input format :

1st line contains 2 space separated integers A and B denoting the number of chocolates and the amount of money Choco has.

The 2nd line contains A chocolates represented by a string. All chocolates represented by lowercase alphabets.

The 3rd line represents 26 space separated integers representing the cost to buy the chocolates.
[First integer represents the cost of the chocolate of type ‘a’, 2nd integer represents the cost of the chocolates of type ‘b’ and so on]

Output format :

Print the maximum number of chocolates Choco can buy.

Constraints :
1<=A<=10^5
1<=B<=10^9
1<=cost of chocolate<=10^9

Sample input 1 :

6 10
aabcda
5 4 4 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Sample output 1 :
4

Explanation :

Choco can select the chocolate of type ‘a’ for free and start buying from index 0 and if he buys “aabc” then he has to pay less (0+0+4+4=8) than the total money he has.

This is the maximum number of chocolates he can get in this case.

Question 2 :Number with 2

Problem Statement  :

Suppose you are in a number system, where if the number doesn’t contain 2 in the unit digit then the number is not valid. So the first number of the number system is 2, the second number is 12, and the third is 22.
for a given integer n, you have to print the nth element of the number system.

Input Format:
First line, containing n denoting the number of test cases.
then n number of lines for the query.

Output Format:
Print the consecutive number in the number system for each query.

Sample Input:
3

Sample Output:
22

Explanation:
1st number will be 2 , 2nd number will be 12 and third number will be 32

Question 3 : Vowel Encryption

 

Problem Statement  :

There is an encryption game going on. You will be given a number. If a digit is prime, it will take a vowel. Otherwise it will take a consonant value.
By this process, you have to make the string the lexicographically smallest possible. For a given number, print the output as a string.;

Input Format:
An integer n denoting the number.
Output Format:
The encrypted word.

Sample Input: 123421
Sample Output: baecab

Question 4 :Jack’s Text

Problem Statement  :

Jack is learning to type english from the beginning and he is making an error of repeating the same words in his texts over whatsapp. Write a function that will take input for his text sent to you and then keep only the unique texts.
Note that, the uniqueness is about being word specific not position, there are nothing but alphabets in the sentences and words are separated only with white space.

Constraints:
Words in the line<=10^5
Alphabets in the words<=20

Sample Input:
Send send the image send to to to me

Output:
Send the mage to me

Question 5 :A Good Prime Number

Problem Statement  :

A prime number is a number which is divisible by one and itself. Also a number is called a good  prime number if the sum of its digits is a prime number. For example a number 23 is a good prime number because the sum of 2 and 3 ( 2+3=5) is 5 which is a prime number. You are given an integer K. Your task is to find the kth good prime number that is greater than a provided number N.

For example , 232 is a good prime number since the sum of all digits is 7 which is a prime number whereas 235 is not a good prime number.

Input format :

  • The first line contains an integer N.
  • The next line contains an integer K.

Output format :

A single integer which is a Kth good prime number that is greater than a provided number N.

Constraints :

  • 1<=N<=10^5
  • 1<=K<<=10^5

Sample Input 1:

4  4

Sample Output 1:

12

Explanation :

Good prime numbers starting from 4 are 5,7,11(1+1=2 which is prime number),12(1+2=3 which is prime number),14(1+4=5 which is a prime number) and so on. Because the sum of digits of an individual number is a prime number And 4 th good prime number is 12 in this series.Hence the output is 12. 

Sample Input 2:

17  5

Sample Output 2:

29

Explanation :

Good prime numbers starting from 17 are 20,21,23,25,29…and the 5th prime number is 29.Hence the output is 29.

FAQs on MakeMyTrip Coding Questions with Solutions

Question 1: What type of questions are asked in the MakeMyTrip Placement exam?

MakeMyTrip has programming mcqs and coding questions in its placement exam.

Question 2: Is Make My Trip exam difficult to crack?

MakeMyTrip exam is definitely not easy to crack as it is totally based on programming questions.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription