Status: 16+ yrs S/W exp
Position: Senior Developer
Sharing my virtual onsite interviewing experience with Microsoft for a Senior Dev role. I had 2 rounds and was rejected.
Round 1: Coding Round. 2 questions
2 numbers are provided in the form of 2 linked lists. Added these 2 numbers. Constraint: The linked list can only be traversed in forward direction. Also it should not be copied over in an array or anything like that. E.g. add (2->4->6) +( 7->5->9) = 1->0->0->5
I was able to come up with a recursive approach which would have added the 2 list by traversing forward only. The backtracking would take care of moving backward in the list. But I was not able to code it well. I got a few hints while I was writing the code which disturbed my chain of thought as the interviewer had a somewhat different approach in mind. As a result I got confused and could not recover from that confusion. Sometime hints do more harm than good during the interview.
Similar to https://leetcode.com/problems/sort-colors/
I had already done this problem before and was able to straightaway tell the solution. The interviewer gave me an option to either code this question or finish coding of my last question. Since time was less, I preferred to complete the code of my previous question. But that did not turn out to be good choice as I was not able to complete it code in time.
Round 2: Design+Coding Round. 2 Questions
The interview started with some discussion about my current job and my role in it. I think I answered it satisfactorily. Then I was asked the folowing questions:
Similar to https://github.com/donnemartin/system-design-primer/tree/master/solutions/system_design/social_graph . I had to design an api to find the degree of seperation between 2 users provided as input.
I had seen a similar question before and was able to answer it reasonable well. Mainly I discussed in details about how to manage graph traversal for a graph that cannot fit in the fast memory and part of it would be on slow memory. Besides this I discussed about various optimizations possible like caching etc.
Similar to https://leetcode.com/problems/group-anagrams/
I was able to come up with the brute force solution. There's a clever trick of sorting the string's characters to detect anagrams which I was not able to think about in the interview. I am always preplexed by the significance of such questions in which if you know the trick, you sail through, else you are stuck.