MMT SSE-2(Frontend) Interview Experience
Anonymous User
879

Round 1:-

Question 1:-

Input: [1, [2, 3], [4, [5, 6]]]
Output: [1, 2, 3, 4, 5, 6]

write a function to flatten it with and without recursion.

Question 2:-

const getPromiseByIndex = (index) => {
  switch (index) {
    case 0:
      return Promise.resolve(6);
    case 1:
      return new Promise((resolve) => {
        setTimeout(() => {
          resolve("done");
        }, 2000);
      });
    case 2:
      return new Promise((resolve) => {
        setTimeout(() => {
          resolve("success");
        }, 4000);
      });
    case 3:
      return Promise.resolve(Date.now());
  }
  return null;
};

function promiseAllSync(promisesArray) {
  // code here
}

promiseAllSync(4)
  .then((data) => {
    // data = [6, "done", "success", 123456788]
    console.log("All promised resolved", data);
  })
  .catch((error) => {
    console.log("reject", error);
  });

 complete promiseAllSync function without using async await.

Question 3:-
Write a component search bar in react when someone type api calls
which return some data and we have to show that list.
-minimum char should 3 to search

Search products

fetch('https://dummyjson.com/products/search?q=phone')
.then(res => res.json())
.then(console.log);

Round 2(Machine Coding or LLD):-

Question 1:-

Build a small React feature where clicking Add creates a new progress bar. Bars should fill one at a time, in order. Each bar takes ~2000ms to reach 100%.
Functional Requirements
Add Bar
Clicking the Add button appends a new progress bar to the list.
Sequential Fill
Only one bar may be filling at any time.
The next bar starts only after the current one reaches 100%.
Duration
Each bar fills from 0 → 100 in ~2000ms (allow ±10% tolerance).
Multiple Adds
Users can click Add multiple times at any moment (including while one is filling). New bars should queue and run in order of creation.
Display
Each progress bar should visually show its current percentage (width or text).

Question 2:-
Implement a minimal file explorer UI in React that lets users dynamically create folders and files in a nested structure.

Functional Requirements
Initial State
Show only a single button: “Create src”.
When clicked, it should create a root folder named src.
Folder Display
Folders are collapsible/expandable.
Each folder displays its name and has a + Add button.
Add New Item
Clicking a folder’s + Add should open a small dialog or menu that asks:
Type: file or folder (radio buttons / dropdown).
Name: input field with a sensible default (NewFile.txt or NewFolder).
On confirmation:
If type = folder, add an empty subfolder under that folder.
If type = file, add a file node inside that folder.
Nested Structure
Newly created folders should also have their own + Add button.
You should be able to create arbitrarily deep folder nesting (like src/components/widgets/…).
Selection
• • Clicking on a file highlights/selects it (for now just visual feedback).

Round 3:-
Question 1:-

const sum = generateSum(4);
console.log(sum(1)(2)(3)(4)); // 10

const sum2 = generateSum(2);
console.log(sum2(5)(2)); // 7

On addition re-write code using Bind call apply ! Use this and make

Question 2:-

- <Pagination currPage={1} totalPage={10} onPageClick={(nextPage) => { 
}} /> 

Rules:
First page, last page, current page , current page -1 , current page +1 should be visible
If any gap between two numbers than we have to show ‘…’

Current page: 1, total Page: 10 
1 210 

Current page: 5, total Page: 10 
14 5 610 

Current page: 9, total Page: 10 
18 9 10  

Round 4:(Hiring manager)-

Question 1:- It is a debugging round basically he provided me some code repo and mentioned some issues in that I have to find issues and fix it(basically have to do optimisations).

It solved problem within 20 mins but he was expecting it to be done within 5 mins. At that time only he said NO to me.

Question 2:- Follow up to previous question. Have to write debug logger for that code only as a middleware. This I wrote in 5 mins only.

He ended this round early only

Verdict:- Rejected(No feedback)

Comments (0)