Preparing for Interview at Microsoft

If you plan to interview for Microsoft, the information on this page may be useful for you. It is something I would have welcomed myself before interviewing with Microsoft in 2005.

How to prepare?

Research resources online and/or read books about interviews in larger companies like Microsoft. Go trough some examples. Practice on paper. Verify solution on computer. Talk with your friends about it, discuss options - their pros and cons. Practice, using online tools like http://leetcode.com.

Check out tips from Microsoft recruiters: How to ace a technical interview at Microsoft.

As an example, I personally expect from candidates:

  • Knowledge of basic data structures and their algorithms like working with strings, lists, binary trees, basic graph algorithms (search), basic sorting.
  • Ability to understand and analyze problems, identify the right basic data structures and algorithms in them.
  • Basic O-notation cost analysis of algorithms and solutions.
  • Adaptability. Passion for technology, coding and solving problems. Ability to retrospect and learn from your past projects - successes and failures. Honesty with yourself and others. Desire to get better and grow (at your own pace). Being a team player.

Recommendation: Online coding practice

I have discovered and tried http://leetcode.com recently. It seems to be great prep tool for interviews. I would recommend to choose Category - Algorithms, difficulty Hard. Do a few, get into position when you can nail some without looking at solution first. Note that some problems may be better than others for preparation for interview.

I personally tried 2 problems and found them very useful for interview preparation. I could imagine asking problems like those in real interview.

I also failed the first problem misserably (I needed 5 submissions to get all corner cases right - oh my!). Definitely not up to my standards, it was pretty emberrassing for me. Apprarently I was overconfident and thought I can do it easily, so I got sloppy and did not pay attention to details. It thaught me a lesson right on the spot - it demonstrates that some preparation is useful even for skilled interviewers. Luckily, I nailed the second problem, which gave me my confidence back (at reasonable level) :).

Here’s list of problems I tried:

If I find some time (that may be unrealistic expectation), I may try more problems and put the interesting ones here.

Recommendation: Book about interviewing for Microsoft

I can recommend book Cracking the Coding Interview - I read the 5th edition in February 2019 (to be able to provide useful resources here ;)), and it is very spot on.

In particular, I liked these parts of the book:

  • I. Interview Process - Dress Code, Top 10 Mistakes
  • II. Behind the Scenes - The Microsoft Interview
  • IV. Before the Interview - Getting the Right Experience, Writing a Great Resume
    • BTW: Contributing to GitHub projects, or having your own smaller project on GitHub is a great way how to show your coding capabilities upfront. However, it is not a must-have - some people may not be priviledged to have that time.
  • V. Behavioral Questions
  • VI. Technical Questions
    • Data Structures - Really great basic questions everyone should be able to do.
    • Concepts and Algorithms - While I don’t think most of these are good interview questions (some Bit Manipulation questions are rather ugly), it is worth going through them all to ensure yourself you understand basic concepts and some “known” tricks (e.g. in Brain Teasers).
    • Additional Review Problems - I didn’t review them carefully, but they seem to be good things to practice on as well. I’d recommend to check them out.

Recommendation: Other online resources for questions

From a quick 10-minute online research I found for example this list of interview questions which I liked.

I actually even found my most used interview question in the list. It is a question I use in almost all 30-min college campus interviews, which means I used it about 80 times. Interestingly, I haven’t met a single person who knew the question upfront (I would recognize if they did and lied or didn’t tell me) - I guess people do not prepare that due diligently or didn’t find this site yet :).

Story: My interview at Microsoft

Before interviewing for Microsoft in 2005 with a friend, we used a web page of 100-ish inteview questions to practice. Those questions were very similar to those listed above in my recommendations. Back then they included even the “weird” questions which are not used anymore like “How many gas stations are in US” or “Why are manholes round”.

I remember coming to the interview confident I can ace most of the questions on the list. I felt like I can nail almost any technical problem with lists, trees, graphs and beyond, especially the complicated ones. I prepared for all the known tricks and games on the list, like Hanoi towers, identifying oddly-weighted ball, etc.

I was shocked and felt almost cheated when the most difficult coding question I got was simple binary search (granted, hidden in a real-world problem of debugger scenario: finding the right method name from IP address in a sorted symbol index at the end of DLL). I almost couldn’t believe my eyes: I was super alert, looking for some trick hiding around the corner. There was none.

For a long time I didn’t understand why it was sufficient for the interviewers to ask me such question. Now I do. Now I understand that you can find a lot of things about how the candidate thinks, how they keep attention to details, how they react to follow up questions, etc. Now I understand that the “warm up” questions about past experience (what went well/wrong, what was difficult) can tell the interviewer a LOT. Often even more than the technical coding question itself.

From my loop of 4 interviews I remember one more question which stood out and blew my mind. It was the last question, clearly targeted at general problem solving. It started innocently with probing what are my hobbies. I didn’t have any significant hobbies back then (I still don’t have), so I said first thing that came to my mind: snowboarding (I just started learning snowboarding and went twice).

I immediately got a great question: “How would you design a snowboard”? That was not something I expected, it threw me off a bit, but very quickly I found it as a cool challenge - sky is the limit :). And I generated ideas, I asked for limits (standalone funded team/company, you are in charge). It was very cool. I enjoyed it on the spot and I think it showed (in a positive way). I covered a lot of things, incl. testing, what is important, who are customers, who can help (hire experts), etc. It was very similar to SW design, working in a team, choosing the right features, etc.

Funny enough, in the last minute of the interview when we were almost wrapping up (the question “Anything else?”), I realized I entirely forgot about security. The entire 45 minutes I did not mention any worry about the product being safe for users. I felt emberassed and disappointed with myself that I forgot about such basic and almost most important thing. And I said so out loud.

Looking at it back, even such genuine reactions (“oh my gosh, how could I forget about something important as this”) and systematic approach to things (list all aspects you covered or should cover) are very important during interview. They tell the interviewer about maturity of the candidate. They show your human face. They demonstrate how you behave in ambiguous situations, how you deal with setbacks, how you attack problems when things are stacked against you. Overall a great interview question IMO.