Summary
I interviewed for a Java SSE2 role at MakeMyTrip, facing rounds on data structures, system design, and core Java technologies. Despite my performance, I was rejected, possibly due to my primary experience being in C++.
Full Experience
My interview process at MakeMyTrip for a Java SSE2 position took place around September/October.
The first round focused on data structures and algorithms, where I was tasked with solving 'Jump Game 1' and 'Jump Game 2'. Additionally, I encountered a problem that asked me to find the last remaining element when repeatedly removing the Kth element from a circular array.
The second round shifted towards Low-Level Design (LLD). I was asked to design the LLD of Uber and verbally explain my algorithm for driver allocation. This round also included some basic High-Level Design (HLD) questions.
The final round was primarily intended to be an HLD discussion. However, the interviewer also posed several questions related to Java, Kafka, Multithreading, and Idempotency. Behavioral questions were also part of this round. The discussion extended to my past projects, covering how I analyze issues, my experience with CI/CD, and how monitoring and visualizations were implemented.
Unfortunately, I was rejected after this round. While I believe I answered most questions correctly, I suspect my background being primarily in C++ might have been a factor, especially given their focus on backend systems. Despite the outcome, I found my interactions with both the interviewers and the recruiter to be positive.
Interview Questions (4)
Given an array of non-negative integers nums, you are initially positioned at the first index, and each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index.
Given an array of non-negative integers nums, you are initially positioned at the first index, and each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of jumps.
Given a circular array, elements are removed sequentially. Starting from a certain point, every Kth element is removed. The process continues until only one element remains. Determine which element is the last one remaining.
Design the low-level components of the Uber application, focusing on aspects like driver allocation, ride matching, and trip management.
Summary
I interviewed for the SSE-2 (Frontend) role at MakeMyTrip, which involved four rounds covering data structures, algorithms, system design, and managerial skills. Despite solving many problems, I was ultimately rejected without specific feedback.
Full Experience
Round 1: Data Structures and Algorithms / JavaScript
This round focused on core programming skills and JavaScript fundamentals. I was asked to solve three distinct problems:
- Flatten Nested Array: Implement a function to flatten a deeply nested array both recursively and iteratively.
- Implement Promise.allSync: Create a custom promise utility that mimics
Promise.allwithout usingasync/await, taking a count to generate promises and resolving their results sequentially. - React Search Bar with Debounce: Build a React component for a search bar that makes API calls to a product search endpoint. The search should only trigger after a minimum of 3 characters are typed and likely required debouncing to prevent excessive API calls.
Round 2: Machine Coding / Low-Level Design (LLD)
This round was a machine coding challenge, testing my ability to build interactive frontend features with React. I had two problems:
- React Sequential Progress Bars: Develop a React feature where clicking an 'Add Bar' button creates new progress bars. These bars needed to fill sequentially, one at a time, each taking about 2000ms. New additions should queue up, and each bar had to display its current percentage visually.
- React File Explorer UI: Create a minimal file explorer UI in React. It starts with a 'Create src' button, which creates a root folder. Folders should be collapsible, expandable, and allow users to add new files or subfolders via a dialog when clicking an 'Add' button. The structure should support arbitrary nesting, and files should be selectable.
Round 3: Advanced JavaScript / React Component Design
The third round dove deeper into advanced JavaScript concepts and React component design:
- Curried Sum Function with Bind/Call/Apply: Implement a curried
generateSumfunction that takes an initial countnand allows subsequent calls to sum up tonarguments, demonstrating explicit usage ofbind,call, orapplyfor context management. - React Pagination Component: Design a
<Pagination>React component. It needed to display the first page, last page, current page, current page -1, and current page +1. Gaps between numbers had to be represented by '...'. I was given examples for different current page scenarios.
Round 4: Hiring Manager
This was the hiring manager round, which involved a practical debugging exercise. The interviewer provided a code repository with identified issues, and my task was to find and fix them, primarily focusing on optimizations. I managed to solve the problem within 20 minutes, but the interviewer expected it to be done within 5 minutes, which was a significant discrepancy. Based on this, I was told that I would not be proceeding further. As a follow-up to the debugging task, I was also asked to write a debug logger for the same code as a middleware, which I completed quickly in 5 minutes. However, the round was cut short due to the earlier performance.
Verdict: I was rejected without any specific feedback.
Interview Questions (7)
Write a function to flatten a deeply nested array like [1, [2, 3], [4, [5, 6]]] into a single-level array [1, 2, 3, 4, 5, 6], providing solutions both with and without recursion.
Implement a promiseAllSync function that takes a number n (representing the count of promises to generate using getPromiseByIndex) and returns a Promise that resolves with an array of all resolved values in order, similar to Promise.all. The implementation should not use async/await.
Build a React component for a search bar. When a user types, it should make API calls (e.g., to https://dummyjson.com/products/search?q=phone) and display the returned list of data. The search should trigger only when a minimum of 3 characters are typed. Provide the component implementation.
Build a small React feature where clicking an 'Add Bar' button creates a new progress bar. These bars should fill one at a time, sequentially, each taking approximately 2000ms to reach 100%. Users should be able to add multiple bars, which will queue up and fill in their creation order. Each progress bar needs to visually display its current percentage.
Implement a minimal file explorer UI in React. Initially, it should show a 'Create src' button, which, when clicked, creates a root folder named 'src'. Folders should be collapsible/expandable and display their name with a '+ Add' button. Clicking '+ Add' on a folder should open a dialog to create either a new file or a new subfolder within it. The UI must support arbitrarily deep nested structures, and clicking a file should highlight it.
Implement a generateSum function that takes an initial number n and returns a curried function. This curried function should allow successive calls like sum(1)(2)(3)(4) to sum up to n arguments, ultimately returning the total sum. The implementation should explicitly use bind, call, or apply and manage this context appropriately.
Create a <Pagination> React component that displays pagination controls. The component should always show the first page, last page, current page, current page -1, and current page +1. If there's a gap between numbers, '...' should be displayed. Examples:
Current page: 1, total Page: 10
1 2 ... 10
Current page: 5, total Page: 10
1 ... 4 5 6 ... 10
Current page: 9, total Page: 10
1 ... 8 9 10
Summary
I interviewed for an SDE2 role at MakeMyTrip, which involved a DSA round with two LeetCode problems and an LLD round focusing on a Vending Machine. Despite my efforts, I was rejected, largely due to a perceived lack of design pattern application in my LLD solution.
Full Experience
-
Received call from Recruiter through Naukri for Java Developer
-
Round 1
- I was allowed to choose any language for this DSA round, so I chose Python.
- Q1. Multiply 2 integers as strings https://leetcode.com/problems/multiply-strings/
- Q2. Populate right pointer of each node https://leetcode.com/problems/populating-next-right-pointers-in-each-node/description/
- For Q2 there was not enough time to code it so I explained the O(N) time and O(N) space solution. To which he said an O(LogN) space solution also exists.
-
Round 2
- LLD of Vending Machine
- Was asked to directly code the objects and methods (method implementation not required)
- I started with showing flow and identifying objects and methods in notepad first, then went to create then in IntelliJ.
- In my opinion, I did good, but the interviewer wanted design pattern to be used, and I hadnt used any.
- I explained we can use CoR in calculating the Cash amount.
- (Later I checked LLD of Vending Machine , everyone implements using some state Management Design pattern)
- I was not using that design pattern but managing the state in a different way.
- She asked how will I handle concurreny in this problem(or other problem in general), before I could answer she jumped to "How many design patterns you know about can you explain a few", I explained a few.
- She then said this vendingMachine class can be a singleton. (I find singletons pointless unless we have code to create an object at multiple places but we only need 1 instance)
- Overall Interviewer was pretty uninterested. She left the interview 2 times to get Coffee.
- Design rounds are supposed to be a discussion. Whenever I tried to discuss, she was like "code it first, else we might not get time at the end"
- Rejected at the end.
-
Compensation was 36LPA (no Joining Bonus or Stocks).
Interview Questions (3)
Design a low-level vending machine system. I was asked to directly code the objects and methods, with method implementation not strictly required. The discussion also involved handling concurrency and various design patterns.
Summary
I interviewed for the SSE profile at MakeMyTrip, facing two rounds which included LeetCode problems and a Low-Level Design question for an elevator system, ultimately resulting in a rejection.
Full Experience
Appeared for SSE profile
Round 1 : LC combination sum LC No. of Island
Round 2 : Asked to design LLD of Elevator system working code with design patterns, concurrency handling, there can be muliple elevators in 40 mins. 20 mins wasted in project discussion.
Verdict : Reject
Interview Questions (3)
The problem was LeetCode's Combination Sum.
The problem was LeetCode's Number of Islands.
I was asked to design the Low-Level Design (LLD) of an Elevator system. The requirements included implementing working code with design patterns, handling concurrency, and supporting multiple elevators. This round was allotted 40 minutes.
Summary
I interviewed for an SDE 2 position at MakeMyTrip in Gurugram and was rejected after two rounds, which included a coding problem with variations and a system design discussion for RedBus.
Full Experience
MMT Interview Experience
Round 1 – Word Search The problem had multiple variations:
- Check if the word exists in the grid
- Count the number of occurrences
- Print the starting and ending positions of each occurrence
I provided a DP-optimized solution, and the interviewer seemed satisfied.
Round 2 – LLD (RedBus) I was asked to design RedBus with the following features:
- Search buses
- View and manage seats
- Seat reusability
- Book tickets
- Payment integration
- Fare strategy
- Notifications
I covered all parts and explained the design, but:
- The interviewer expected UML diagrams, which I couldn’t complete in time
- He wasn’t happy with the time complexity of the search functionality
- After a few resume-based questions interview ended, Got call from recruiter that feedback is not positive.
Interview Questions (2)
I was asked to design RedBus with the following features: 1. Search buses, 2. View and manage seats, 3. Seat reusability, 4. Book tickets, 5. Payment integration, 6. Fare strategy, 7. Notifications.
Summary
I recently interviewed for an SDE/SSE 2 position at MakeMyTrip, which involved three rounds covering Data Structures & Algorithms, Low-Level Design, and High-Level Design. Although I performed well in DSA and HLD, my LLD round faced some challenges. I haven't heard back from the company, leading me to believe I was rejected.
Full Experience
I came across an opening at MakeMyTrip on LinkedIn and applied, not really expecting to be shortlisted given my past experiences. However, a week later, I received a call from HR inviting me for an interview, which I gladly accepted. I was informed there would be three rounds: Problem Solving/DSA, LLD, and HLD.
Round 1 - DSA + Few HLD and Java questions
This round focused on Data Structures & Algorithms, along with some HLD and Java-specific questions.
I was asked two primary DSA questions and managed to solve both, though I made a few mistakes that I quickly rectified when the interviewer pointed them out. The interviewer was kind, collaborative, but also firm.
Following the DSA problems, I was asked several other questions:
- What is a Record in Java? (This came up because I used it while coding the DSA problem).
- What is an interceptor in Spring and why do we need it?
- How would you ensure that double payment doesn't happen when requests to payment are made twice?
I believe I gave decent answers to all of these, and the interviewer seemed satisfied. Overall, the first round wasn't flawless, but I felt it went really well for me.
Round 2 - LLD and HLD
I was told this would be a pure LLD round, but to my surprise, I was asked one LLD and one HLD problem.
For the LLD problem, I implemented the Builder pattern and added synchronized locks where necessary for thread safety. However, the interviewer wasn't satisfied, expecting a solution involving Atomic variables as synchronized is blocking. I was also asked to create two threads and run my program. I coded everything in an online IDE, but I made really silly mistakes concerning static methods and classes, getting stuck for a while. I felt bad about these trivial errors. The interviewer then suggested we move to the next question.
The HLD question was about shortening a URL for a MakeMyTrip booking. It involved generating a long URL, converting it to a shortened form, and ensuring only the original user could access it, with unauthorized access blocked. Having read about TinyURL system design before, I recognized it as a variant. I provided a solution and explained how sessions and authentication could ensure proper access control.
The interviewer seemed satisfied with my HLD solution. When I asked for feedback, I was told my HLD was good, but my LLD wasn't up to the mark. I haven't heard back from them in a while, so I'm guessing I've been rejected. This was my first interview in four years since college, and while the interviewers were nice and it was a good learning experience, it still hurt.
Interview Questions (7)
You are given a method which you need to complete: public Emp getCommonManager(Emp e1, Emp e2). You can design the Emp class however you like. Given two employee objects (e1, e2), you need to find and return the closest manager common to both of them in an organizational hierarchy.
Given an array of integers, find any subarray which has a sum of 0.
Explain what a Record in Java is and why it is used. This question was asked because I used a Record while coding one of the DSA problems.
What is an interceptor in Spring, and why do we need it?
How would you ensure that double payment doesn't happen when requests for payment are made twice?
Implement the Builder pattern in a thread-safe way. I was also asked to create two threads and run the program to demonstrate its thread-safety.
Design a system to shorten a long URL for a MakeMyTrip booking. The system should generate a unique shortened URL and ensure that only the original user who made the booking can access it, preventing unauthorized access by others. This was described as a variant of the TinyURL system design question, with an added requirement to handle the generation of the initial long URL.
Preparation Tips
I had prior knowledge of the TinyURL system design, which helped me address a similar problem during the interview. Other specific preparation details were not mentioned.
Summary
I interviewed for a Tech Lead position at MakeMyTrip in Bangalore, completing online coding, system design, and a comprehensive on-site microservices HLD and coding round. I successfully received an offer for the role.
Full Experience
I began my interview process with an online HackerRank test, which I found to be relatively easy.
The first round was a 1-hour coding assessment. I encountered two questions. The first was an easy implementation problem involving two arrays representing a store's open and close timings. The second was a dynamic programming question that I recognized but hadn't prepared thoroughly. I managed to develop a recursive approach and explained how memoization could optimize it, which the interviewer seemed satisfied with.
The second round, also 1 hour, was focused on system design. My task was to design a railway system, specifically detailing the database schema, SQL queries for routes and booking tickets, and how to handle concurrent bookings. This felt like a medium-difficulty challenge.
The third and final round was an on-site interview, which lasted 2 hours. Although HR initially indicated it would be for Low-Level Design and basic questions, it turned out to be a full-fledged High-Level Design discussion centered on Microservices. This round was quite challenging. We delved into topics such as reducing high latency between two microservices, designing an idempotent ticket booking system, and creating a scalable system to handle very high QPS. Additionally, there was a coding question: I needed to download a website's HTML, count occurrences of a specific string (e.g., 'makemytrip' on https://www.makemytrip.com/), and output the result in a specified format [URL, string, count]. The key requirement was to implement this using multiple threads and ensure proper communication between them.
Overall, all my interviews were conducted by very good and polite interviewers. I was selected for the role.
Interview Questions (6)
Given two arrays representing the open and close timings of a store, implement a solution based on this data.
Design a railway ticketing system covering aspects like database schema design, SQL queries for figuring out routes/booking tickets, and handling concurrent bookings.
Discuss and propose solutions for reducing high latency between two microservices.
Design an idempotent ticket booking system.
Design a scalable system capable of handling a very high Queries Per Second (QPS).
Implement a program to download a website's HTML (e.g., https://www.makemytrip.com/), count occurrences of a particular string (e.g., 'makemytrip'), and output in the format: [URL, string, count]. The solution must use multiple threads and ensure proper communication between them.
Summary
I interviewed for an SSE2 role at MakeMyTrip. The experience involved a DSA round with specific LeetCode problems and an LLD round that unexpectedly shifted to HLD for Dream11. Despite performing well in DSA, I was ultimately rejected after the second round, largely due to highly disengaged interviewers.
Full Experience
My interview journey for the SSE2 position at MakeMyTrip consisted of two rounds, which unfortunately were marred by a rather disappointing interviewer experience.
Round 1 - Data Structures & Algorithms (DSA):
This round was purely focused on DSA. The interviewer was largely unresponsive and remained on mute for most of the session. I attempted to discuss various approaches for the problems, but it felt like they were only interested in the final code. I provided the optimum solutions for both questions. I was selected for the next round.
Round 2 - Low-Level Design (LLD) / High-Level Design (HLD):
This round was scheduled as an LLD discussion, but the interviewer immediately asked me to design the High-Level Architecture for Dream11. Similar to the first round, the interviewer was mostly on mute, and at times, seemed to be conversing with other teammates. It truly felt like I was talking to a wall. Despite the lack of interaction, I proceeded with my design and did my best to articulate my thoughts and respond to the few counter-questions they eventually posed regarding my design choices. Unfortunately, I was rejected after this round.
Honestly, I question why some people take interviews if they are so disengaged. I've heard similar reviews about MakeMyTrip on other platforms, and now I've experienced it firsthand. It's something to consider when making career choices.
Interview Questions (3)
I was asked to design the High-Level Architecture for a fantasy sports platform similar to Dream11. This involved outlining the core components, data flows, and scalability considerations.
Summary
I recently interviewed for a Senior Software Engineer - 2 position at MakeMyTrip in September 2023. The interview process, which spanned three rounds, rigorously tested my skills in frontend development, data structures, and system design.
Full Experience
My interview journey for the Senior Software Engineer - 2 position at MakeMyTrip in September 2023 was a thorough and engaging experience. I navigated through three distinct rounds, each designed to probe various facets of my technical expertise. Round 1 focused on core JavaScript and algorithmic challenges, while Round 2 delved into ReactJS concepts and a practical machine coding problem. The final Round 3 was dedicated to system design, deeper Redux discussions, web performance metrics, and a behavioral conversation about my learning trajectory.
Interview Questions (10)
Write a polyfill for the Array.flat method in JavaScript that supports a customized level of nesting.
Given two sorted arrays, merge them into the first array in-place without using extra space (or minimal extra space).
Write a JavaScript function that allows for method chaining, such as calc().add(10).subtract(5).multiply(20).divide(2).getResult(), which should evaluate to 50.
Explain the key differences between PureComponent and React.memo in ReactJS.
Discuss concepts related to Redux and its middlewares.
Implement a typeahead (autosuggest) search box. This component should fetch data from an API and include all necessary performance optimizations (e.g., debouncing, caching).
Design the system architecture for WhatsApp, including detailing its various APIs.
Discuss the trade-offs involved in using Redux for state management and share your personal opinion on its practical applications.
Explain how each of the Web Vitals works, discuss strategies for their improvement, and analyze scenario-based questions, such as the impact of a delayed Server-Side Rendered (SSR) document on specific Web Vitals.
Share information about two technologies I have recently learned and what I plan to learn next.
Summary
I interviewed for a Lead Engineer position at MakeMyTrip, which involved three technical rounds. The interviews covered a range of topics including multithreading, linked list manipulation, array problems, and extensive system design focusing on microservices and workflow orchestration.
Full Experience
Round 1: Problem Solving & Concurrency
The first round kicked off with two coding challenges. The initial problem involved concurrency, requiring me to demonstrate my understanding of multithreading. Following that, I tackled a problem related to linked lists that tested my logic for sorting based on specific criteria.
- Question 1: Print Even and Odd Numbers with Two Threads
I was asked to implement a solution to print even and odd numbers using two separate threads. Thread 1 should print even numbers, and Thread 2 should print odd numbers.
- Question 2: Sort Linked List by Actual Value (Absolute Sorted)
I was given a linked list of integers that was sorted by their absolute values. The task was to sort this linked list by their actual values. For instance, if the input is
1 -> -2 → 3 → -4 → 5 → -6, the expected output should be-6 → -4 → -2 → 1 → 3 → 5.
Round 2: Data Structures & System Design
The second round was a mix of a standard data structure problem and an initial foray into system design. I first solved an array manipulation problem, and then moved onto designing a critical service for the company's domain.
- Question 1: Product of Array Except Self
I needed to construct a product array
prod[]of the same size as the input arrayarr[]ofnintegers. Each elementprod[i]should be equal to the product of all elements ofarr[]exceptarr[i]. - Question 2: Design Hotel Search and Ranking Service
I was asked to design a system for hotel search and ranking. The inputs include city name, search criteria (check-in, check-out, number of adults, rooms). The system should involve a 'Search service' and a 'Hotels Ranking service' (microservice). I needed to discuss how ranking modulation would work for different users, considering factors like user footprint, giving higher rank for the same place, budget preferences (e.g., budget on iPhone), lower prices for small cities, and IP-based considerations.
Round 3: Advanced System Design
The final round was entirely focused on a complex system design problem, specifically concerning workflow orchestration. This round required me to think about task dependencies, parallel execution, and data flow between different stages of a workflow.
- Question 1: Design Workflow Orchestration Service
The task was to design a workflow service capable of running tasks both in parallel and sequentially. I was given examples like
workflow1where tasks T1 and T2 run in parallel, followed by T3 which executes only if T1 and T2 are successful, and then T4, T5, T6, T7. Another exampleW2showed T1, T2, T3, T4, T5 running in a specific sequence. A key requirement was the ability to pass outputs from previous steps to subsequent ones.
Interview Questions (5)
I was asked to implement a solution to print even and odd numbers using two separate threads. Thread 1 should print even numbers, and Thread 2 should print odd numbers.
I was given a linked list of integers that was sorted by their absolute values. The task was to sort this linked list by their actual values. For instance, if the input is 1 -> -2 → 3 → -4 → 5 → -6, the expected output should be -6 → -4 → -2 → 1 → 3 → 5.
I needed to construct a product array prod[] of the same size as the input array arr[] of n integers. Each element prod[i] should be equal to the product of all elements of arr[] except arr[i].
I was asked to design a system for hotel search and ranking. The inputs include city name, search criteria (check-in, check-out, number of adults, rooms). The system should involve a 'Search service' and a 'Hotels Ranking service' (microservice). I needed to discuss how ranking modulation would work for different users, considering factors like user footprint, giving higher rank for the same place, budget preferences (e.g., budget on iPhone), lower prices for small cities, and IP-based considerations.
The task was to design a workflow service capable of running tasks both in parallel and sequentially. I was given examples like workflow1 where tasks T1 and T2 run in parallel, followed by T3 which executes only if T1 and T2 are successful, and then T4, T5, T6, T7. Another example W2 showed T1, T2, T3, T4, T5 running in a specific sequence. A key requirement was the ability to pass outputs from previous steps to subsequent ones.
Summary
I interviewed for an SDE1 position at MakeMyTrip in May 2022. Although I successfully navigated the online assessment and the first DSA round, I faced a rejection in the System Design round due to my lack of preparation for such problems as a fresh graduate.
Full Experience
My journey began with an online assessment on April 24th, 2022, which lasted 1 hour and 30 minutes. The assessment included two coding challenges: the 'Longest Ideal Subsequence' problem from LeetCode, and another problem identified as 'Safe Paths' from a MakeMyTrip OA discussion. I successfully completed this round.
The first technical round, focused on Problem Solving and Data Structures & Algorithms, took place on May 16th, 2022. My interviewer was an SDE-2 with over 5 years of experience. I was given two questions. The first was a variation of the 'Combination Sum' problem, where each element could be used only once. For an input like Target = 7, nums = [1,1,2,2,3,4], I needed to find combinations such as [3,4], [2,2,3], [1,1,2,3], and [1,2,4]. I solved this using a backtracking approach, similar to the original Combination Sum problem. The second question asked me to sort an array using only recursion. I implemented a recursive Bubble Sort algorithm, which had an O(n^2) time complexity. The interviewer seemed satisfied with my solutions for both problems, and I passed this round.
The final round, a Design/OOSD round, occurred on May 24th, 2022. This round was led by a senior engineer with 10-11 years of experience, who clearly had a strong grasp of Software Architecture and Design. He started by discussing my resume and past internship experiences. Following this, he presented a design problem: 'Design and write an OOP based code with an ER diagram for an elevator management system.' Unfortunately, I had no idea how to approach this problem and openly admitted my lack of knowledge. After only about 15 minutes, he informed me that I should have another discussion with him after 6 months, which was essentially an on-the-spot rejection. He also asked some in-depth OOPS questions, specifically requesting an explanation of runtime polymorphism and why an abstract class cannot be instantiated. The interview concluded in less than 45 minutes, leading to my rejection. I believe my failure in this round was due to not anticipating a System Design question for a fresh graduate role. I had focused on DSA, assuming it would be another DSA round based on previous experiences shared by fresh graduates. The interviewer's condescending demeanor from the start might also have affected my performance.
Interview Questions (5)
Given a collection of candidate numbers (nums) and a target number (target), find all unique combinations in nums where the candidate numbers sum to target. Each number in nums may only be used once in the combination. Note that the solution set must not contain duplicate combinations. Example: Input: Target = 7, nums = [1,1,2,2,3,4]. Output: [3,4], [2,2,3], [1,1,2,3], [1,2,4].
Sort a given array of integers using only recursive functions. For instance, implement a recursive version of Bubble Sort.
Design an Object-Oriented Programming (OOP) based code for an elevator management system. This should include an Entity-Relationship (ER) diagram.
Provide an in-depth explanation of runtime polymorphism. Discuss why an abstract class cannot be instantiated (cannot have an object).
Preparation Tips
I prepared extensively for this interview, focusing on Sean Prasad's list, Neetcode 150, and Grind 75. However, I didn't anticipate being asked System Design questions as a fresh graduate, which ultimately cost me the offer.
Summary
This post shares a JavaScript interview question about creating a utility function findPath to retrieve values from a nested object based on a dot-separated key path, along with a detailed iterative solution.
Full Experience
During an interview for a software development role, I was presented with a coding challenge to implement a findPath utility function. This function was designed to safely access deeply nested properties within an object using a dot-separated string path, returning undefined if any part of the path did not exist. I then proceeded to implement the solution.
Interview Questions (1)
A string will be passed as an argument, if there is an embedded key present in the object, return it else return undefined.
Problem Statement:
Write a method findPath that should take two parameters:
- object: The source object.
- keys separated by dots as string: The path to the desired property.
Return the value if it exists at that path inside the object, else return undefined.
Example Usage:
var obj = { a: { b: { c: 12, j: false }, k: null } };
console.log(findPath(obj, 'a.b.c')); // 12 console.log(findPath(obj, 'a.b')); // {c: 12, j: false} console.log(findPath(obj, 'a.b.d')); // undefined console.log(findPath(obj, 'a.c')); // undefined console.log(findPath(obj, 'a.b.c.d')); // undefined console.log(findPath(obj, 'a.b.c.d.e')); // undefined console.log(findPath(obj, 'a.b.j')); // false console.log(findPath(obj, 'a.b.j.k')); // undefined console.log(findPath(obj, 'a.k')); // null
Summary
I interviewed for a Senior Software Engineer I role at MakeMyTrip in March 2021 and successfully received an offer. The interview process spanned four rounds, covering technical problem-solving, system design, and HR discussions.
Full Experience
My interview journey for the Senior Software Engineer I position at MakeMyTrip in March 2021 was divided into four primary rounds.
Technical Round I (Virtual teams call): This was primarily a Problem Solving/Data Structures & Algorithms round where I faced two challenges. The first problem was based on Dynamic Programming with BFS, similar to Jump Game III. The second involved a matrix 90-degree clockwise rotation, akin to Rotate Image. I managed to explain efficient logic and then implement code for both problems. Following this, there were Java language-specific questions on topics like immutable strings, garbage collection (GC), and Comparable interfaces, aligning with the Java backend role I applied for. I was later informed of my selection for the subsequent rounds.
Technical Round II (Virtual teams call): This round was another Problem Solving/Data Structures & Algorithms session with two problems. One problem required an ad hoc approach, and the other was the Valid Sudoku problem. I successfully answered both questions with correct and efficient solutions. A few hours later, HR contacted me to confirm my advancement to the next stage.
Manager Round (Virtual teams call): This round focused on Design and Implementation. I was presented with a Low-Level Design (LLD) problem: to design a Java application capable of converting various data types (e.g., Integer, String, Map, List) into JSON format, with specific conversion rules provided. I was given 1 hour and 15 minutes to design and implement the solution on an IDE while the interviewer observed. I successfully implemented the problem using appropriate design patterns, specifically the strategy pattern, and the interviewer seemed satisfied with my approach.
HR Round (Virtual teams call): After successfully clearing the initial technical and managerial rounds, an HR round was scheduled to finalize the process. This involved standard discussions regarding my motivation for changing roles and compensation expectations.
Overall, I found the interviewers to be friendly and supportive, and the general difficulty level of the interview process was medium. I was ultimately offered the Senior Software Engineer I role at MakeMyTrip, which I was very pleased to accept.
Interview Questions (4)
Given an array of non-negative integers arr, you are initially positioned at start index. When you are at index i, you can jump to i + arr[i] or i - arr[i]. Your goal is to reach any index with a value of 0. You can assume that you can always reach the end of the array. The problem involves determining if it's possible to reach any index where the value is 0. (The problem description is based on the LeetCode link and common understanding of Jump Game III).
You are given an n x n 2D matrix representing an image, and you need to rotate the image by 90 degrees clockwise. The rotation must be performed in-place, meaning you must modify the input 2D matrix directly without allocating another 2D matrix. (The problem description is based on the LeetCode link and common understanding of Rotate Image).
Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to these rules: Each row must contain the digits 1-9 without repetition. Each column must contain the digits 1-9 without repetition. Each of the nine 3x3 sub-boxes of the grid must contain the digits 1-9 without repetition. (The problem description is based on the LeetCode link and common understanding of Valid Sudoku).
I was tasked with designing and implementing a Java application that could convert various data types, specifically Integer, String, Map, and List, into JSON format. The problem statement provided explicit rules for how each data type should be converted. I had 1 hour and 15 minutes to complete the design and implementation on an IDE, in front of the interviewer.
Preparation Tips
Based on my experience, I would strongly advise practicing Data Structures and Algorithms extensively. It's also vital to develop a good understanding of design patterns and to be highly proficient in your primary programming language. My preparation focused on these areas, which proved to be very beneficial during the interviews.
Summary
I interviewed for an SDE 2 position at MakeMyTrip in Gurgaon and was rejected after the second round, primarily due to the design challenges.
Full Experience
I received a call from a recruiter regarding an SDE 2 opening at MakeMyTrip in Gurgaon.
First Round:
The first round focused heavily on Java. The interviewer asked about my comfort level with Java and then dove into basic questions like 'Why ismain declared as static?'. Since I mentioned using Java 8, we discussed new features such as lambdas, why they're useful, the Stream API, and collectors. I was also asked to write a program to calculate the sum of numbers in an array using Java. The interviewer was clearly a Java enthusiast!
Following the Java questions, we moved to data structures and algorithms. I was given two problems:
- Next Greater Element
- Modify an array into zig-zag order. For example, given
{19, 27, 32, 43, 5, 6}, transform it to{27, 19, 43, 5, 32, 6}.
Second Round:
This round focused more on design.- The first problem was to design a Multi-level Parking Lot, starting with Low-Level Design (LLD) and then moving to High-Level Design (HLD). We delved deep into classes and database schema, with the interviewer asking many follow-up questions. This round felt average; the interviewer seemed to be in a rush and was looking for on-the-spot solutions rather than a detailed explanation of my thought process.
- Next, I was given a problem from a cricket match scenario: 'Given a target to chase, while you can score only 1s or 2s, count how many ways are there with which you can chase the target.' This is a classic Staircase Problem variant. I explained both a recursive and a dynamic programming solution thoroughly.
- The final question was to design an LRU-LFU cache. The eviction policy was specific: first, choose the least frequently used element, but if there are multiple with the same minimum frequency, then choose the least recently used one. I explained the LLD well, but struggled a bit with the HLD, particularly the database schema. I initially thought of using multiple tables, but the interviewer later pointed out that it could be done with a single table (key, value, frequency, last accessed at).
Interview Questions (8)
Explain why the main method in Java is declared as static.
Discuss new features introduced in Java 8, specifically focusing on lambdas (why they are used), the Stream API, and Collectors.
Write a program in Java to calculate the sum of all numbers in an array.
Given an array of distinct elements, rearrange the elements in zig-zag fashion. That is, arr[0] < arr[1] > arr[2] < arr[3] > arr[4] < arr[5] .... Example: Input: {19, 27, 32, 43, 5, 6} Output: {27, 19, 43, 5, 32, 6}.
Design a multi-level parking lot system. Focus on both Low-Level Design (LLD) covering classes and their interactions, and High-Level Design (HLD) including database schema and overall architecture. Be prepared for in-depth follow-up questions.
Design an LRU-LFU cache. The eviction policy is as follows: first, choose the least frequently used element to remove. If there are multiple elements with the same minimum frequency, then choose the least recently used among them. Provide both Low-Level Design (LLD) and High-Level Design (HLD).