The HR contacted me after seeing my profile on LinkedIn .
It was a Hackerrank based online test . There were 3 questions to be completed in 1 hr 30 mins. I don’t remember the questions exactly but 2 questions were based on DP and 1 on graphs. I completed 1 question completely and half of the second question and was called to face to face interviews in their office.
This was a whiteboard coding round where they wanted to know how you write code. Clean and modular code was what they were looking for .
Q1. Find cycle in an undirected graph – I used UNION FIND to solve the problem. After that they asked me about the time complexity and why I used UNION FIND and not DFS
Q2. Find all factors for a given number .
eg 6 : (1X6), (2X3)
12 : (1X12), (2X6), (3X4), (3X2X2)
I used prime factors and recursive function call to solve this problem.
This was again a whiteboard coding round . I was asked 1 question. Here they were seeing the approach you are using to solve a problem and not complete code.
Q. Given a String and a pattern, find the smallest window that contains all the characters in the pattern.
I used the sliding window approach to solved this problem . I wrote a code with NQ time complexity (N- Length of string, Q length of pattern) . They were looking for something more optimised here
This was a HLD round. They asked me to design a google calendar . They were keen on knowing how I’ll store the data for so many users . How various calendar functions (refresh calendar, create invite, delete meeting, know participants who accepted and rejected the invite) would work. Further they asked me how you would scale with increasing customer base. I was using RDBMS to store the data. So, I split the information across various db instances and used one table to track what machine contains data for which user (I was using a unique identifier for each user)
This round was more about your project in your previous company and what are your major contributions . They asked me to explain everything as if they were new hires and I’m helping them onboard on my project.
This was a Hiring manager round where you are asked about different stuff. He asked me about my projects, why I was lloking for a change . Then we discussed about various features in LinkedIn and If there is anything I suggest to include and change. This was a fun round .
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.