Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
1,556 views
in Interview-Experiences by Expert (30,360 points) | 1,556 views

1 Answer

0 like 0 dislike

Status: 1.3 YOE working in a product based company
Position: SDE1
Location: Gurugram
Date: September 10, 2022

 

Was contacted by recruiter via LinkedIn. No OA, she asked there will be just two rounds of interview: 1 DSA specific and 1 on system design.

 

Round-1: Technical interview with SSE
The interviewer was very polite and the interview began with an introduction. The focus was to know each other technically and professionally. Discussed my current projects and my role in the team.
Had a rigourous discussion on my resume. Please make sure you know your resume inside out. The, he asked to design schema for college management system, and few questions on normalisation, pros and cons of normalisation. Then he gave me a coding problem. Dont remember exactly but it was like you are given an array containing both negative and positive numbers. you are supposed to remove exactly two elements from any end such that the sum of remaining elements is maximum, and finally return the indices of the elements to remove. Intially i tried to solve the problem using DP, but the interviewer keep on giving hints, and finally I was able to solve it in a time complexity: O(N). The interviewer was happy. Follow up question: Remove exactly k elements such that the sum is maximum.
Ran out of time, but overall the experience was nice and the interviewer was happy.
Got the recruiter call immediately after 30 mins asking if I was available for second round of interview on the same day to which I replied yes.

 

Round-2: Technical round with engineering manager
The interview began with an introduction. He further asked me to do a SWOT (strengths, weaknesses, opportunities, and threats) analysis. Had a discussion on this for about 10 mins. Further he gave me a system design question:

 

Imagine you're building an alerting solution for an API. The API processes requests. In case too many requests come in a short period of time, we want to notify the oncall.

We should send a notification after a request if any of the following is true:
- there were more than 3 requests in the last 1 second
- there were more than 25 requests in the last 10 seconds

Given a sorted array of timestamps (in seconds) of arriving requests, compute how many notifications need to be sent out.

Example:
[1,1,1,1,1,2,2,2,3,3,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,15] -> 4

Here I've marked the requests that would trigger the notification:
[1,1,1,(1),(1),2,2,2,3,3,3,(3),4,4,5,5,6,6,7,7,8,8,9,9,10,(10),15]

 

I started the discussion by suggesting a queue data structure and handled both the conditions by maintaining a queue of objects. The object will have an internal count of request which will handle the first condition and the queue size will handle the second condition. Though my solution satisfied the current scenarios but would fail eventually when it comes to scaling. The interviewer was looking for a scalable and production ready code. He suggested to maintain n-queues for n-condition to which I argued that it wouldnt be space optimised if millions of requests are coming up in this case. He asked me to believe that his solution doesnt have any trade-off which was kind of distressing since system design rounds are supposed to be open to discussion.
Didnt heard back after them. Tried to asked for feedback but got ghosted afterwards.
Anyways long way to go, but I am happy I am not in some organisation where there is no room for discussion and all they do is to impose what they believe is right.

by Expert (30,360 points)