Round 1: Coding Round (2 hrs)
The first round was the coding round conducted on HackerEarth. There were 40 Multiple Choice Questions based on C, OOPS, OS, DS-Algo and aptitude(around 20 questions). These were basic questions. There were 3 more coding questions :-
Question 1 : (50 marks) It is the simple question. You have to apply level order BFS in a matrix.
Question 2 : (50 marks) DP coin change problem.
Question 3 : (100 marks) I didn’t remember the question exactly. But the question is of finding connected component in the graph.
I have solved first two questions completely and third question partially(30 points).
So At the end of the day, they declared the results and I was shortlised for the next Round with 15 more students.
Round 2: Interview
The interviewer was young and friendly and he asked me to introduce myself. Then he started asking coding questions.
First, he ask me the difference between Pointers and References in C++.
Then he asked me a coding question :- https://www.geeksforgeeks.org/a-boolean-matrix-question . He asked me both the approaches.
Then he gave me another question. Given an array of even size n, 1 element is present n/2 times and all other elements are distinct. You have to find the element that is present n/2 times. I reached to the solution with three approaches.
Approach 1 ( O(NLogN) ) : Sort the array and find the element. He asked me to improve it.
Approach 2 ( O(N)with extra space ) : Build a hash with frequency of each number and then traverse the hash. So he asked me what is the time complexity in searching an element in hashmap. I said O(1). Then he asked me the types of hashing and we have a discussion on hashmaps for 5 minutes and came up with a conclusion that worst time time complexity of seaching is O(N) in hashmap. He asked me to further improve the solution.
Approach 3 ( O(N) without extra space) : Two of the repeating number will be either at 1 or 2 distance from each other. For eg : if Arr = 1, 2, 3, 2, 3, 2. So if we see two occurrences of 2, they are at distance = 2.
He asked me about my subjects. I told him that i have studied DBMS, OS, Networks.
Then he asked me the questions on DBMS. “What data structure does SQL use?” Answer is B Trees. Then he asked me “Why do we use SQL ?”
After that he asked me “What happens when you type a URL in web browser?” Explain in context of OS and Networks. This is the final question of the round.
Round 3 : HR Round
She asked me how was my interview and if i had any questions for her. So this was normal discussion round.
Final Verdict : SELECTED
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.