MakeMyTrip Interview Experience | Set 12

I’d like to share my MakeMyTrip interview experience with GeeksforGeeks. I interviewed with MakeMyTrip in Bangalore in the month of July, 2016.
Round 1

  1. Given an array of sorted integers, with many of them repeating, and an element x, find the number of occurrences of x. Expected time complexity O(lgn)
  2. You have a certain amount of money X, which, if you invest in a bank, gets split into these denominations every year – X/2, X/3, X/4. After every year, you are allowed to withdraw any denomination and any number of these three (including all of them. If you withdraw all of it the total money you’ll have is x/2 + x/3 + x/4, where x is the money in the bank at the time of withdrawing). Say you withdraw X/2, the money left in the bank x = X/3 + X/4. Now for the next year, this x gets split into x/2, x/3, x/4. And so on. Find the maximum profit you can make.
  3. Given two words and a dictionary, find the minimum number of changes to be made to the first word so as to form the second word, if you are only allowed to make one change at a time. For example: Word1 = CAT Word 2 = FAR. Words in the dictionary are = { ACT, CAN, CAR, FAT, FAN, FAR }.
    Answer: min number of transformations is 2. CAT -> CAR -> FAR (or CAT -> FAT -> FAR).
    Hint: think shortest paths in a graph

Round 2

  1. Given an array of n digits (from 0 to 9), and an integer k, find the maximum number that can be formed by the array if you are allowed k swaps between adjacent elements.
  2. Search for a given element x in a sorted and rotated array
  3. Discussion on projects and work experience

Round 3



  1. Nuts and Bolts problem. I was asked to write code for it
  2. Given a string, find out if it is composed of a repeating pattern. For example, String s = “xyzxyzxyz” is xyz * 3 (so the function returns true), and for “abcabcd” it returns false
  3. Find the median of three sorted arrays, later extended to k sorted arrays

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above


Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up