OnCampus Interviewing Experience: Microsoft SWE
Part 1 of the series where I talk about my experience of going through the SDE Interview process at various companies.
Microsoft is like a dream company for many people me included :P.
Why won't it be its the company which develops typescript making web app development so much easier, VSCode favourite IDE of all developers 😌, Azure Cloud Services, Windows the first Operating System that most people use.
The Process Included two parts the Coding Round and then Interviews, based on which students were selected. While Coding Round was eliminating Interviews were not, so everyone was able to give 2+ interviews.
Microsoft provided us with two questions on Codility. The first one was an easy greedy + sorting question where you have to check by using available cranes can an object be moved from
E. Sort the
(crane position - length , crane position + length) then keep on moving B till it reaches a crane that has B and E in the same range. Made sure to swap B if it's greater than E. That was that.
Another one was also an easy greedy problem. We were given that a player made
T dice moves off which he only remembers
N moves exactly and mean of all the dice moves. So we just have to find the remaining possible value of move which can be done very easily by dividing the remaining sum ( found using mean*T - the sum of N) among all values equally and if some still remain divide it one to each.
The thing about Codility is they won't run any test cases in front of you they are all hidden which I only realized after submitting 1st question.
2 Rounds were conducted for me there was no clear separation as to whether they were HR or Technical. I was asked HR-related and technical questions in both rounds.
The interviewer asked me about myself. I had been finding the right answer for this for quite some time now. I started with personal info, then what I do? which is open source contributions, technical blogging and attending conferences. He seemed impressed as he told me that wasn't the usual answer he gets.
I also told him about how I started my technical journey as a child curious to get acquainted with Windows XP and MS Office. Also, my current stack is Visual Studio Code and Typescript, both developed by MS again 😄.
Knight and Destination
The was that question given a
n*m chessboard, and you have a Knight piece that needs to go from
D, find the minimum number of moves required to reach destination
D. I started with a crude simple BFS solution, and before coding, I explained my approach to him. After a go-ahead, I coded the initial solution, which was un-optimized. He asked me to do a quick dry run to show that it works.
Next, he asked me how would I do memoization so that the complexity is not exponential. So I implemented memorization using a
n*m array which stores the minimum move from that location
(x,y). Next, he asked me how can I do pruning for the solution so that we don't go to longer paths if we already have a minimum implemented that was just an if-else check on the current minimum to stop when needed.
Finally, he asked me, since it was uninformed BFS, what better could be done. I told him that Dijkstra's Algorithm would do the job nicely, but since it's a matrix, we can use A* Heuristic Search Algorithm to do even better. I showed him why this would happen by defining the heuristic function as manhattan distance. I wasn't asked to code them, just what and how better?
Finally, he seemed satisfied and asked me why Microsoft I also had it covered. My answer was that I wanted to empower new developers to build even better software using services like Azure, Typescript and VSCode which will give me a sense of pride that the software I built is being used by developers to create even better services for users.
He then asked me if I wanted to ask anything. I asked him what he does, and day to day workings of his at Microsoft. He gladly told me about the project he was working on which included created higher-level APIs for Database manipulation in Azure.
Level Order Traversal Binary Tree
This started without my introduction. This time he gave me a problem after introducing himself. The problem was printing level order traversal of a binary time. This time I was asked to code first then explain, so I quickly went ahead and gave a solution using queue and yeah, it seemed good to him.
Although he stopped me midway when I used
auto in C++ because that surely makes it difficult for humans at the end, humans should understand code, not just machines. Finally, I did a Dry Run of the implementation and was done with the question.
Explain Any Project
Next, he asked me what was the most difficult part of any project I had mentioned in my resume. I asked him do open-source contributions count? and he was impressed and went on to tell me that at Microsoft, they value Open Source so yes they count. So I told him, in brief, all the issues I had when I started with DXHeroes and PGRouting also talked a bit about my GSOC project, which I didn't particularly tell as GSOC project but just any open source contribution.
Talk about GSOC Project and Async I/O
As open source is huge, he wanted to know just something specific he asked me about my GSOC Project at Chapel, which I cited as a productive parallel programming language. I told him that this was my first time working with C System Call, joked about getting my hands dirty with pointers, allocation, etc. ( he laughed too xD ).
I finally told him about issues with I/O multiplexing, which I was resolving using Asynchronous I/O. Async IO hit him as something that college don't have experience with, and he himself worked on it, so he told me, like, yeah, that is a totally different game.
Finally, my chance to ask, I asked him what interns do whether their code makes into actual user apps or not.
Some people had round 3 as HR, or Technical mine wasn't, so after the interview, I was sad, but Training Placement Cell Representative told me that it wasn't the case that I was eliminated, so was happy again.
And Yeah Selected 😊
Thanks for reading :) and please share your thoughts. I always like to meet more enthusiastic people, so do reach out to me on Twitter or Linkedin to share your feedback or for any queries. I'd be more than happy to help and connect.