This post is not about the questions as such in my Microsoft interview but how to get prepared for a Microsoft interview purely from my perspective.
Preparation is a key thing for any interview, be it with MS or any other company. Know the fundamentals well. Books which I read/recommend are my academic text books “Introduction to Algorithms” well known as CLR or Cormen and “Algorithm Design” by GoodRich and Tamasia.
Very Very important. Every company asks you to write code. At MS interviews what I found is people expect you to write a bug-free/optimized code that actually works for the question asked. [Yes, its same everywhere]. Here people expect you to write a production quality code. The interviewers will not be happy if they find a bug/error in the first look. Make sure to check all the boundary cases, input (params) validation, ofcourse the main thing is the logic/algo.
Practise some coding questions before coming to interview. I would recommend practising on a piece of paper, then cross check it with some test cases and then input this code in your favourite editor, compile/run and make sure its working as expected. Doing this way for some questions gives you the confidence and then onwards it would be sufficient to practise on a paper instead of spending time on typing in an editor.
I would suggest you to run your code through some test cases before submitting your code to the interviewer.
Before getting started with the code discuss your approach with the interviewer, if you are into a wrong path they might guide you to a proper path.
3. Understand the problem
First thing is do not make any assumptions, even if you make any communicate it properly. If you find any ambiguities get them clarified. There is no point answering to a question which you do not understand [what are you solving there!].
An important thing, people here are very smart/intelligent. So just don’t try to blabber some non-sense stuff.
Have a proper sleep before the interview day. Have patience, its definitely going to be a long day. Have good lunch during the lunch break. No point in fainting in your last round 😛
I will be very happy if some one can add any valuable inputs in the comments.
I will write about my WOW-Experience of joining Microsoft in a new post 🙂