MMT SSE-2(Frontend) Interview Experience
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