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.
This was a written test round with questions based on data structures and algorithms.



1. The sub-array of an array is a continuous part of the array.
2. Consider ‘0’ based indexing.
3. ‘k’ will always be less than or equal to ‘n’.
3. Don’t print anything, just return the integer array ‘count’.
To solve the question in time complexity less than O(n), divide and conquer approach can be used.
Approach :
1. Check the first and last element of the sorted sequence.
2. If both are equal, the only element in the sequence is the first (only one unique element in the entire sequence).
3. Else, if the are different, divide the sequence and repeat for each subsequence.
Average case time complexity : O(log n)
Worst case time complexity : O(n) when all elements are different



For the given string “what we think we become”
“what”,” think”, and “become” occurs 1 time, and “we” occurs 2 times in the given string.
Hashing can be used to solve this problem.
Use a hash map data structure to store the occurrence of each word in the string.
Traverse the string and for each element, check whether it is present in the map or not. If it is present, then update the frequency of the current word else insert the word with frequency 1.
Traverse in the map and print the frequency of each word.



If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
Steps :
1. Reverse the individual words of the given string one by one.
2. Then, reverse the whole string from start to end to get the desired output.
Time Complexity : O(n)



a. First row(left to right)
b. Last column(top to bottom)
c. Last row(right to left)
d. First column(bottom to top)

What data structures will you use to design a garbage collector?
Linked lists and sorted trees (heaps, b-trees etc), arrays (or tables) of pointers and arrays(or tables) of counts can all be considered for use in the garbage collector.
This round had questions more around various technology stacks : Design Patterns ( Interceptor, Singleton, Publisher Subscriber, MVC etc etc ) , UI Templates , REST , Spring , Java , In memory database and Log appenders.



For ‘N’ = 3,
All possible combinations are:
((()))
(()())
(())()
()(())
()()()
The question can be solved using a backtracking approach. Use two integers to count the remaining left parenthesis (n) and the right parenthesis (m) to be added. At each function call add a left parenthesis if n >0 and add a right parenthesis if m>n. Append the result and terminate recursive calls when both m and n are zero.
Steps :
1. Create a backtrack function that updates the current string if open_brackets are less than n or close_bracket are less than open_bracket
2. When the length of current string becomes equal to 2*n , add it to the combination result array.



Input: 'list' = [1, 2, 3, 4], 'k' = 2
Output: 2 1 4 3
Explanation:
We have to reverse the given list 'k' at a time, which is 2 in this case. So we reverse the first 2 elements then the next 2 elements, giving us 2->1->4->3.
All the node values will be distinct.
Recursion can be used to solve this problem. We reverse every group of k linked list nodes and attach it to the previous group.
Steps :
1) The first step is to check whether the Head is NULL or Not, if its NULL then we can directly return NULL,
2) If the Head is not NULL, then we need to check the length of Linked List starting from current Head.
3) If the length is less than k , then there is no need to reverse it and hence we can directly return head,
4) Else if its a multiple of K, then we have to reverse the K elements starting from current Head. While reversing keep track of the next node and previous node.
5) We will follow the same steps for the rest of the elements Recursively and link the two sub-lists.
Time Complexity : O(n)
Auxiliary Space : O(n/k)



The Linked Lists, where a1, a2, c1, c2, c3 is the first linked list and b1, b2, b3, c1, c2, c3 is the second linked list, merging at node c1.

Steps :
• Calculate number of nodes in the first list, let it be c1.
• Calculate number of nodes in the second list, let it be c2.
• Take the difference of counts d = abs(c1 – c2)
• Now traverse the bigger list from the first node till d nodes so that from here onwards both the lists have equal no of nodes
• Then, Traverse both the lists in parallel till you come across a common node.
HR round with typical behavioral problems.
1. Why do you want to join MakeMyTrip ?
2. What are your career aspirations?
3. How do you think it aligns with MMT?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?