Interview
Round-1:
The interview began with the interviewer asked me for my introduction. Then, without wasting any time, he gave me a coding question to solve. He asked to Implement a Queue data structure.
I asked if I have to explain the logic or can I code directly. He told to explain the logic, so explained him that we can use arrays to implement a queue with front and rear pointers. He asked if which is better to use – arrays or linked lists. I said linked lists because they take up less memory. Then he told to start coding. I coded it in around 10 minutes and explained it along the way. I took a test case and ran the code. It worked fine. He was impressed with the code.
Then he asked how do you implement a square root function. I said binary search. He didn’t tell me to code it. The interview ended with him asking if I had any questions. Total duration was 25-30 minutes.
20 minutes after the interview I got a call for round-2.
Round-2:
This round also started with an introduction. The interview then asked some about my projects and other things from my resume. He asked some general HR questions like – what were challenges you faced during your project, what did you learn from it, etc. After that he gave me a coding question: https://leetcode.com/problems/reverse-nodes-in-k-group/
He gave this test case:
Input LL : 1-2-3-4-5-6-7-8-9 , k = 3
Output : 3-2-1-6-5-4-9-8-7
I had solved this question previously from Striver’s SDE Sheet. He told me start coding directly. I was explaining the code while I was coding, but he said no need to explain, just code. I finished coding the solution in 15-20 minutes. The code worked fine for the test case he gave. He then said there is small bug in my code, try to resolve it. I told some edge cases like if k = 0, and empty list, in that cases I return the list as it is. He then gave a test case where length of linked list is 8 and k = 3. He said in that case my code fails. I told that I assumed that the length of the list would be a multiple of k. He said ok that’s fair enough and then asked some theory questions on OOPS. Then the interview ended.
Final Verdict:
I wasn’t selected for the internship. A total of 5 students were selected from our campus. I honestly don’t know where I did wrong, it was probably my CGPA. Mine’s less than 8 and all the selects had greater than 8. I previously heard that Microsoft has CGPA bias but still gave it a shot. Just bad luck.
Microsoft’s OA and interview rounds are pretty easy. If you have a good CGPA, and above average coding ability you can easily clear the interview. If your cg is low, better don’t apply for it.