MakeMyTrip SDE / SSE 2 Interview Experience
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.