i
MakeMyTrip
Filter interviews by
I appeared for an interview in Sep 2021.
Round duration - 60 Minutes
Round difficulty - Medium
The test was in the morning at around 11.
It was on online assessment.
HackerEarth was perfect like everytime.\
MCQ were based on HTML ,CSS , JS, OOPS, SQL, Aptitude, OS.
You are given a source point (sx, sy) and a destination point (dx, dy). Determine if it is possible to reach the destination point using only the following valid mo...
The problem involves determining if it is possible to reach a destination point from a source point using specified moves.
Iterate through each test case and check if destination is reachable from source using specified moves
Implement a recursive function to explore all possible paths from source to destination
Keep track of visited points to avoid infinite loops
Return true if destination is reachable, false otherwise
You are provided with a Binary Search Tree (BST) containing 'N' nodes with integer data. Your task is to remove a given node from this BST.
A BST is a ...
Implement a function to delete a node from a Binary Search Tree and return the inorder traversal of the modified BST.
Understand the properties of a Binary Search Tree (BST) - left subtree contains nodes with data less than the node, right subtree contains nodes with data greater than the node.
Implement a function to delete the given node from the BST while maintaining the BST properties.
Perform inorder traversal of the...
Round duration - 90 Minutes
Round difficulty - Hard
The interviewer was very friendly. He gave me problems one by one and asked me to write code for all of them in Code Pair round. Explain Scope and Scope Chain in javascript. What is a Stored Procedure in SQL?
Given a binary matrix of size N * M
where each element is either 0 or 1, find the shortest path from a source cell to a destination cell, consisting only...
Find the shortest path in a binary matrix from a source cell to a destination cell consisting only of 1s.
Use Breadth First Search (BFS) algorithm to find the shortest path.
Keep track of visited cells to avoid revisiting them.
Calculate the path length by counting the number of 1s in the path.
Handle edge cases such as invalid inputs and unreachable destination.
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.
Given an array of integers and a target sum, find all pairs of elements that add up to the target sum.
Use a hashmap to store the difference between the target sum and each element as keys and their indices as values.
Iterate through the array and check if the current element's complement exists in the hashmap.
Return the pairs of elements that add up to the target sum in sorted order.
You are given a binary tree with 'N' integer nodes. Your task is to determine whether this binary tree is a Binary Search Tree (BST).
A Binary Search Tr...
Validate if a given binary tree is a Binary Search Tree (BST) or not.
Check if the left subtree of a node contains only nodes with data less than the node's data.
Check if the right subtree of a node contains only nodes with data greater than the node's data.
Ensure that both the left and right subtrees are also binary search trees.
Traverse the tree in an inorder manner and check if the elements are in sorted order.
Recurs...
Round duration - 45 minutes
Round difficulty - Medium
The round was with CTO level person. He was very friendly. What is the difference between SQL and MySQL? What are Constraints in SQL?
You are provided with a string 'S'. The task is to determine the length of the longest duplicate substring within this string. Note that duplicate substrings ...
Find the length of the longest duplicate substring in a given string.
Iterate through all possible substrings of the input string.
Use a rolling hash function to efficiently compare substrings.
Store the lengths of duplicate substrings and return the maximum length.
You are given an array ARR
consisting of N
elements. Your task is to determine the maximum value of the summation of i * ARR[i]
among all possible rotations of ...
Find the maximum sum of products for array rotations.
Iterate through all possible rotations of the array and calculate the sum of products for each rotation.
Keep track of the maximum sum of products found so far.
Return the maximum sum of products obtained.
Tip 1 : DSA should be very very good.
Tip 2 : Computer Science Fundamentals are very important
Tip 3 : Think out loud in an interview
Tip 1 : At least 2 very well prepared projects
Tip 2 : Internship experiences always help
I appeared for an interview in Sep 2021.
Round duration - 90 minutes
Round difficulty - Easy
2 Coding Questions and 20 MCQ's to be solved in 90 minutes. It was from 6 pm. The camera and screen-recorders were on. The mcq was on web, oops, dbms.
You have a 2D grid of dimensions 'N' rows by 'M' columns, initially filled with water. You are given 'Q' queries, where each query contains two integers 'X' and 'Y'....
The task is to determine the number of islands present on a 2D grid after each query of converting water to land.
Create a function that takes the grid dimensions, number of queries, and query coordinates as input.
For each query, convert the water at the given coordinates to land and then count the number of islands on the grid.
Use depth-first search (DFS) or breadth-first search (BFS) to identify connected land cells f...
Given an integer array, your objective is to change all elements to the same value, minimizing the cost. The cost of changing an element from x
to y
is defined ...
Find the minimum cost to make all elements of an array equal by changing them to the same value.
Calculate the median of the array and find the sum of absolute differences between each element and the median.
Sort the array and find the median element, then calculate the sum of absolute differences between each element and the median.
If the array has an even number of elements, consider the average of the two middle elem
Round duration - 70 minutes
Round difficulty - Medium
The interview started with the interviewer asking me about my projects and why and what I have used in them. Be very clear with all the technologies you have used in your project as the interviewer will ask you in-depth about it.
Explain Components, Modules and Services in Angular. What is a Recursive Stored Procedure?
You are given an integer array ARR
. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in a...
Determine the length of the shortest contiguous subarray that needs to be sorted to make the entire array sorted in ascending order.
Iterate from left to right to find the first element out of order.
Iterate from right to left to find the last element out of order.
Calculate the length of the subarray between the two out of order elements.
You are given an array 'ARR'
of size 'N'
consisting of positive integers. Your task is to determine the minimum number of operations required to make all elements in t...
Minimum number of operations to make all elements in an array equal by performing addition, subtraction, multiplication, or division.
Iterate through the array to find the maximum and minimum elements.
Calculate the difference between the maximum and minimum elements.
The minimum number of operations needed is the difference between the maximum and minimum elements.
You have three rods numbered from 1 to 3, and 'N' disks initially stacked on the first rod in increasing order of their sizes (largest disk at the bottom). Your task is to...
Tower of Hanoi problem involves moving 'N' disks from one rod to another following specific rules in less than 2^N moves.
Implement a recursive function to move disks from one rod to another while following the rules.
Use the concept of recursion and backtracking to solve the Tower of Hanoi problem efficiently.
Maintain a count of moves and track the movement of disks in a 2-D array/list.
Ensure that larger disks are not p...
Multithreading allows multiple threads to run concurrently, while semaphores are used to control access to shared resources in a synchronized manner.
Multithreading involves running multiple threads within a single process, allowing for parallel execution of tasks.
Semaphores are used to control access to shared resources by allowing only a certain number of threads to access the resource at a time.
Semaphores can be bina...
Round duration - 30 minutes
Round difficulty - Easy
The interviewer was VP of Engineering at MakeMyTrip with more than 10 years of experience. He asked about the 4 Pillars of OOPS and we had an in-depth discussion with real-life applications for each of them.
You are provided with two integers, 'N' and 'D'. Your objective is to determine the square root of the number 'N' with a precision up to 'D' decimal pl...
Implement a function to find the square root of a number with a given precision.
Create a function that takes 'N' and 'D' as input parameters
Use a mathematical algorithm like Newton's method to approximate the square root
Iterate until the precision condition is met
Return the square root with the required precision
Tip 1 : Never lose hope. Just keep working.
Tip 2 : Solve at least 5 problems each day of medium level or 3 questions of hard level with complete understanding.
Tip 3 : Keep at least 3-4 projects in your resume.
Tip 1 : Keep it 1 page.
Tip 2 : Revise it very well before the interview.
Tip 3 : Know your projects in-depth. They might also ask you to show a demo as it is a virtual interview. So, keep them ready before the interview.
I appeared for an interview in Aug 2021.
Round duration - 120 Minutes
Round difficulty - Medium
There were two sections mcq's and coding. We were allowed to switch between sections and there was no specific time for any section. Around 350 students gave the test.
Given an integer array ARR
of size N
, your task is to find the total number of inversions that exist in the array.
An inversion is defined for a pair of integers in the...
Count the total number of inversions in an integer array.
Iterate through the array and for each pair of elements, check if the inversion condition is met.
Use a nested loop to compare each pair of elements efficiently.
Keep a count of the inversions found and return the total count at the end.
Given a binary array 'ARR' of size 'N', your task is to determine the maximum length of a sequence consisting solely of 1’s that can be obtained by converting at...
Find the maximum length of a sequence of 1's by converting at most K zeroes into ones in a binary array.
Iterate through the array and keep track of the current window of 1's and zeroes.
Use a sliding window approach to find the maximum length of the sequence.
Update the window by flipping zeroes to ones within the limit of K flips.
Return the maximum length of the sequence obtained.
Round duration - 50 Minutes
Round difficulty - Medium
About 45 students were shortlisted for this round. My interview was at 10:15am. I was asked to introduce myself.
Given an integer array 'A' of size N, your task is to find the maximum value of j - i, with the restriction that A[i] <= A[j], where 'i' and 'j' are indices of the ar...
Find the maximum distance between two elements in an array where the element at the first index is less than or equal to the element at the second index.
Iterate through the array and keep track of the minimum element encountered so far along with its index.
Calculate the maximum distance by subtracting the current index from the index of the minimum element.
Update the maximum distance if a greater distance is found whil...
You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree...
The task is to determine the left view of a binary tree, which consists of nodes visible when viewed from the left side.
Traverse the binary tree level by level from left to right, keeping track of the first node encountered at each level.
Use a queue to perform level order traversal and keep track of the level number for each node.
Store the first node encountered at each level in a result array to get the left view of t
Round duration - 40 Minutes
Round difficulty - Easy
About 17 students cleared the first round. My second round was at 4:30pm. The interviewer was very humble.
Round duration - 20 Minutes
Round difficulty - Easy
This was HR round, 7 students were shortlisted for this round. I received the call after 6:30pm.
Tip 1 : For on campus placements, focus more on core subjects rather than very good projects/internships.
Tip 2 : You must cover all important Data Structures and their important/fundamental questions at least twice. For advanced Data Structures like DP, graph, trees, you should have good practice before hand.
Tip 3 : Solve aptitude questions occasionally.
Tip 1 : Don't put too much skills/projects if you are not confident about it, u need not have very rich resume during on campus placements
Tip 2 : it should be readable and authentic
Top trending discussions
I appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Easy
Two coding questions were given in the first round to be solved in 60 minutes.
Given an array A
containing 'N' integers and an integer m
, rearrange the elements of the array such that the differences between the array elements and m
are sor...
Rearrange array elements based on their differences from a given integer.
Calculate the differences between each element and the given integer.
Sort the elements based on their differences while maintaining the original order for elements with the same difference.
Implement a function to rearrange the array elements as per the given criteria.
Given an arbitrary binary tree, a node of the tree, and an integer 'K', find all nodes that are at a distance K from the specified node, and return a list of th...
The task is to find all nodes in a binary tree that are at a distance K from a given node.
Traverse the binary tree to find the given node
From the given node, perform a depth-first search to find all nodes at distance K
Use a list to store the values of the nodes at distance K
Return the list of values in any order
Round duration - 60 minutes
Round difficulty - Easy
This was a technical round with questions based on DSA, DBMS, Computer Networking and project based questions.
Ninja is tasked with printing a triangle pattern based on a given number 'N' for any test case.
N = 4
1
232
34545
4567654
The pat...
Print a triangle pattern of numbers based on a given number 'N'.
Iterate through each row and print the numbers accordingly
Use spaces to center-align the numbers in each row
Increment the numbers in each row as per the pattern
Web server serves static content over HTTP, while application server runs dynamic content and business logic.
Web server handles HTTP requests and responses, serving static content like HTML, images, and CSS.
Application server executes business logic, runs dynamic content, and interacts with databases.
Web server examples include Apache, Nginx, while application server examples include Tomcat, JBoss.
Web server focuses on...
The internet is a global network of interconnected computers that communicate using standardized protocols.
The internet is made up of a vast number of interconnected networks of computers.
Data is transmitted over the internet using protocols such as TCP/IP.
Websites are hosted on servers connected to the internet, and users access them using web browsers.
Internet Service Providers (ISPs) provide access to the internet f...
SQL query to find the nth highest salary
Use the 'SELECT DISTINCT' statement to get unique salary values
Order the salaries in descending order using 'ORDER BY' clause
Use 'LIMIT' and 'OFFSET' to get the nth highest salary
Round duration - 30 minutes
Round difficulty - Easy
Typical HR round with behavioral problems.
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.
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.
I applied via Campus Placement
Regex for email validation
Start with a string of characters followed by @ symbol
Followed by a string of characters and a period
End with a string of characters with a length of 2-6 characters
Allow for optional subdomains separated by periods
Disallow special characters except for . and _ in username
Print prime numbers in a given range and optimize the solution.
Use Sieve of Eratosthenes algorithm to generate prime numbers efficiently
Start with a boolean array of size n+1, mark all as true
Loop through the array and mark all multiples of each prime as false
Print all the indexes that are still marked as true
Find angle between hour and minute hand in a clock given the time.
Calculate the angle made by the hour hand with respect to 12 o'clock position
Calculate the angle made by the minute hand with respect to 12 o'clock position
Find the difference between the two angles and take the absolute value
If the angle is greater than 180 degrees, subtract it from 360 degrees to get the smaller angle
To un-hash a string, use a reverse algorithm to convert the hash back to the original string.
Create a reverse algorithm that takes the hash as input and outputs the original string
Use the same logic as the hash function but in reverse order
If the hash function used a specific algorithm, use the inverse of that algorithm to un-hash the string
Print the level order traversal of binary tree in spiral form
Perform level order traversal of the binary tree
Alternate the direction of traversal for each level
Use a stack to reverse the order of nodes in each level
Print the nodes in the order of traversal
Find the maximum element in each subarray of size k in a given array.
Iterate through the array from index 0 to n-k.
For each subarray of size k, find the maximum element.
Store the maximum elements in a separate array.
Return the array of maximum elements.
To find the Kth largest element in two sorted arrays, we can use the merge step of merge sort algorithm.
Merge the two arrays into a single sorted array using a modified merge sort algorithm.
Return the Kth element from the merged array.
Merge two sorted arrays into one sorted array with expected time complexity of (m+n).
Use a two-pointer approach to compare elements from both arrays and merge them into the first array.
Start comparing elements from the end of both arrays and place the larger element at the end of the first array.
Continue this process until all elements from the second array are merged into the first array.
The algorithm finds the position of the 3rd occurrence of 'B' in an n-ary tree from a given index in constant time complexity.
Traverse the n-ary tree using a depth-first search (DFS) algorithm
Keep track of the count of 'B' occurrences
When the count reaches 3, return the current position
If the end of the tree is reached before the 3rd 'B', return -1
Check if a given string is a composite of two words from a limited dictionary.
Create a hash set of all the words in the dictionary.
Iterate through all possible pairs of substrings in the given string.
Check if both substrings are present in the hash set.
If yes, return true. Else, return false.
Switch adjacent nodes in a single linked list.
Traverse the linked list and swap adjacent nodes.
Keep track of previous node to update its next pointer.
Handle edge cases for first two nodes and last node.
Example: 1->2->3->4 becomes 2->1->4->3.
Traverse only the left sub-tree of a binary search tree.
Start at the root node
If the left child exists, visit it and repeat the process
If the left child does not exist, return to the parent node
Continue until all nodes in the left sub-tree have been visited
Design an efficient data structure for two lifts in a building of n floors.
Use a priority queue to keep track of the floors each lift is heading to
Implement a scheduling algorithm to determine which lift to assign to a new request
Consider adding a weight limit to each lift to prevent overloading
Use a hash table to keep track of the current location of each lift
To find the maximum number that can be formed from the digits of an integer.
Convert the integer to a string
Sort the characters in descending order
Join the sorted characters to form the maximum number
Senior Software Engineer
325
salaries
| ₹12 L/yr - ₹33 L/yr |
Assistant Manager
278
salaries
| ₹4.8 L/yr - ₹20 L/yr |
Holiday Expert
226
salaries
| ₹1 L/yr - ₹8.1 L/yr |
Senior Business Development Manager
223
salaries
| ₹5 L/yr - ₹12 L/yr |
Software Engineer
220
salaries
| ₹8 L/yr - ₹25 L/yr |
Cleartrip
Amazon
Flipkart
Udaan