Round 1 (Online coding round):
This was a 2 hours long round, which consisted of 4 sections- Coding, Quant, Subjective, and Advanced.
The Coding section comprised of 2 questions.
Question 1: Given an array, starting from the beginning of the array till it’s end, whenever you encounter the number ‘2’, add another ‘2’ just after it. In doing so, the last element in the array would be removed, because the final array should be the same size as the initial one. For example, if the initial array is [23, 2, 3, 12, 2, 2, 34, 55, 66, 79], then the modified array should be [23, 2, 2, 3, 12, 2, 2, 2, 2, 34]. Expected time complexity is O(n) and you should do it in place (using only constant amount of extra memory).
Question 2: There are ‘n’ ads. Each ad has an effectiveness value associated with it which is given in an array of size ‘n’ in the format [v1, v2, …, vn], where ‘v1’ is the effectiveness value of the first ad, ‘v2’ is the effectiveness value of the second ad, and so on. The show in which these ads will be shown is ‘m’ length long (starting from 0 till m), and the time when the ads can be shown is given in the format [(a1, b1), (a2, b2), …, (an, bn)], where ith tuple in the array denotes the timing of the ith ad in the format (start_time, end_time). Note that any ‘ai’ and ‘bi’ cannot be smaller than 0 and cannot be larger than ‘m’. When you choose to show an ad, you cannot show another ad within 4 minutes of it’s end. So if you select to show the ad having timings as (2, 4), then you cannot show another ad before 9, hence next ad cannot be (8, 10), but it can be (9, 12). You have to select the ads to show to the audience such that you maximize the sum of the effectiveness values of the ads, given the above constraints. For example, if ‘m’ is 20, and the timings of the ads are [(2, 3), (6, 9), (10, 12), (12, 13), (14, 17)] and the effectiveness values are [3, 9, 10, 6, 7], then you can show ad 2 and ad 5 (one-based-indexing) and have an effectiveness value of 16, which is the maximum you can get given the constraints.
The Quant section consisted of about 10 questions.
These were mixed questions on Probability, Computer Architecture, Operating Systems, High School Mathematics, and Discrete Mathematics. You can expect anything related to Maths and Computer Science in this section.
The Subjective section consisted of 2 questions.
Question 1: You have your final examinations from next week, and you also have your interview of your dream company next week. You cannot attend your exams if you want to give your interview. What would you do?
Question 2: You see that your President has leaked the exam documents on social media before it’s commencement. What do you do?
The advanced section consisted of 1 question.
The length of question was large. I don’t exactly remember the question. But once you understand the question the logic and very clear and easy.
I did both the questions of the coding section, and about 7 questions of quant section, and of course both the questions of the subjective section. 29 students were called for interviews, and most of them did both questions of the coding section.
Round 2 (Interview Round 1 (on-campus)):
The shortlisted candidates were called for interviews. He asked me about myself. I gave him my introduction and my interests. Then he started discussing one of the projects that I mentioned in my resume. We discussed about the project for about 20 minutes, and he was looking quite happy with the answers. He asked me about my favorite data structure. I said Linked List, Tree, Arrays. He continued with asking me 1 puzzle. https://www.geeksforgeeks.org/puzzle-9-find-the-fastest-3-horses/. He asked me 2 coding question and write code for both of them on paper.
1). Find maxSumPath in a binary tree. https://www.geeksforgeeks.org/find-maximum-path-sum-two-leaves-binary-tree/
2). Find Fixed point in an array. (binary search solution). https://www.geeksforgeeks.org/find-a-fixed-point-in-a-given-array/
All the puzzles asked by interviewer to different candidate were available on geeksforgeeks.org.
Round 3 (Interview Round 2 (on-campus)):
I was called for second round of interview. The interviewer asked me how my last interview went. Then he jumped straight to questions. He asked me two quite easy questions.
1). First one was to find common number in 3 sorted array. https://www.geeksforgeeks.org/find-common-elements-three-sorted-arrays/
2). Explain the amortized analysis of Quick sort algorithms.
One puzzles was also asked in this interview round. https://www.geeksforgeeks.org/puzzle-18-torch-and-bridge/
Round 4 (Interview Round 3 (on-campus)):
I was called for third round of interview. The interviewer asked about my internship and course projects which I had mentioned on the resumes. Then he jumped straight to questions. He asked me one coding question he wanted me to write code including all the corner cases.
1). You have to partition an array such that both side contains element of equal sum. I explained him bottom-up dp solution and wrote code and dry run the test cases. https://www.geeksforgeeks.org/partition-problem-dp-18/
6 students were selected for the SDE position, and I was one of them. I would suggest you to brush up your coding basics and be confident during the interview process.
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.