# MakeMyTrip Interview Experience for Software Engineer

• Difficulty Level : Basic
• Last Updated : 28 Sep, 2021

Status: New grad, BE COE Tier-1 College

Position: SDE at MMT

Location: Gurgaon / Bangalore

Date: August , 2020

Round 1 : Online Assessment on HackerEarth

8 MCQs and 2 Algorithmic Coding Question.

1. You are given the coordinates (x,y). Initially, you are at (1,1) and are required to go to (x,y) using the following rule: If the current position is (a,b) then in the next move, you can move only to (a+b,b) or (a,a+b).
Write a program to check if you can reach (x,y) using only the described moves.
Constraints: 1<= T <= 10^5 , 1<= x,y<= 10^18
Hint : Find the gcd(x,y).

2. You are given N nodes. There are N-1 connecting edges between any 2 nodes. Each node has a value denoted by array A.
Write a program to divide the tree along an edge i so as to minimise the difference between the sums of the node values on either side of the edge.
Link: https://www.hackerrank.com/challenges/cut-the-tree/problem ( Similar problem but in the question you were supposed to find the edge which gives the min abs difference and not the difference)

Round 2 : Technical Interview – 1

There were 3 DS based questions, all of which were live-coded on codepair.

1. It was a path finding problem in binary matrix solved by backtracking.
Similar to https://www.geeksforgeeks.org/longest-possible-route-in-a-matrix-with-hurdles/.
2. It was a hashmap-based problem where you were given 2 arrays and were supposed to print the pairs resulting to a given number K.
3. Check if a binary tree is a BST or not.

Some Discussion on OOPs concepts:

1. What are the 4 major OOPs conepts?
2. Explain all of them with examples.

OS:

1. Cache Memory.
2. Critical Section Problem.
3. Mutex vs Semaphore.

Round 3 : Technical Interview – 2

This round started with a discussion on the projects listed in my resume and on my summer intern.

1. Then the interviewer asked which OS do i use. I use Linux so he asked me some questions related to shell commands which i was able to answer more or less.
2. Then there was one DS question to find the longest repeating substring in a string. I gave a brute force approach and then optimized it using hashmaps. The interviewer seemed satisfied.