Microsoft Interview Experience

I would like to share my Microsoft interview experience in this post so that it can be helpful for the students preparing for the upcoming interviews. First of all, I would like to mention that the selection process was enjoyable and the interviewers at Microsoft were really nice and kind throughout the process.

Microsoft visited our campus IIT (ISM), Dhanbad in August 2020. The entire hiring process was virtual and, in a nutshell, consisted of 4 rounds.

Round 1(Coding Round): In this round, 3 coding questions were to be solved within a period of 90 minutes. It was held on Mettl platform. This round was quite easy and I had completed it within 20 minutes.

  1. Given an integer, find the total number of set bits, first and the last set bit.  
  2. Given a string, find out the longest palindromic sub-sequence.
  3. Given an array of integers, find the number of inversions in the array. The expected time complexity is O(n2).

After the coding round, there were 3 rounds of interview.

Round 2 (Technical Interview): This round went about for nearly 50 minutes and it was quite smooth. The first question asked by the interviewer was based on my projects, experiences, and my current work in the ongoing internships. After this, one coding question based on a binary search was asked.



  • Given, a sorted array pivoted (rotated by some number) at some point, find the position of a given element.  

I gave a brute force O(n) approach straight away and made it clear that I was thinking for an optimized solution. Later, I explained the O(log n) solution using binary search and was asked to write the code for the same. He found something peculiar in my code and I had to prove myself through a test case. Cross questioning on the written code was followed by a question to dry run the code on test cases where my code might fail. I suggested a test case and it failed on that. Finally, I made the corrections and the interviewer was quite satisfied. This round went pretty well.

Round 3(Technical Interview): This round went for nearly 1 hour and 20 minutes. It wasn’t as smooth as the previous 2 rounds and I guess most of the filtering of candidates took place in this round. I was tested on my analytical, coding, and problem-solving skills in this round.

  1. Why was I interested in machine learning and deep learning (which is my area of interest) and not my core branch subjects?  
  2. Then, 3 output questions were asked, one of them was based on pointers, another was based on recursion and storage classes. I don’t remember the 3rd one.
  3. The next set of questions were based on LRU cache. Define the LRU cache and what data structure would you use to implement it? My first approach was using queue but later on, I felt vectorized implementation along with hashing would work. I was questioned about its space and time complexity and was also asked to further optimize the space complexity. I gave a solution with optimized space complexity at the cost of time complexity. He seemed satisfied with the solutions. Then, I was asked about a real-life example of LRU cache, I couldn’t think of an example at that time.
  4. Questions based on locked transactions in the banking sector. What will happen if 2 transactions are being made from the same account exactly at the same time? What are the different checks made by the bank to keep a check on frauds? I suggested some methods based on analytical thinking and observations from my daily life.  
  5. How is a URL shortened?  
  6. Given, an array of integers what will be the maximum OR value? Find the smallest subset that gives the maximum OR value? I solved this using dynamic programming.
  7. Given a BST, find the distance between 2 nodes whose values are given. I explained the DFS approach for this by taking one element as the root.  

Round 4(Technical + HR Interview): This round lasted for about 45 minutes. Questions in this round were based on the following topics:

  • Operating Systems
  • Data Structures and Algorithms
  • Machine Learning and Deep Learning (my area of interest)
  • Project-based questions
  • Networking
  • System Design
  • HR questions
  1. What were the questions which you found difficult in the previous rounds? He started cross-questioning on them. How will you develop a machine learning model that detects fraud in the bank sector? (as I had mentioned that real-life example of LRU cache and banking sector questions were challenging) After a brief period of time, I was able to answer what he exactly wanted.
  2. What projects have you done? Explain them.  
  3. What were the challenges you faced in the college in the past 2 years?
  4. How did you manage to pursue coding and machine learning being from an electrical engineering branch?
  5. What have you done outside your college curriculum? (Extra-curricular + Courses pursued + Technical Experience)
  6. The next set of questions were based on networking. How does a bank links an account of an account holder when an account number is entered? What protocols are used when this is done? What is client-server scripting? Some more networking questions were asked. I was not aware of the networking concepts but I kept interacting and tried to answer something based upon my knowledge of networking basics that I had learned in CBSE class 12th. 
  7. How will you design an elevator system? What scheduling algorithm will you use for it? I was aware of scheduling algorithms, as it is an important topic in the OS. I suggested 2 methods for it, one being priority-based (non-preemptive) and the other being SJF (shortest job first). But he asked for a solution that does not use these 2 algorithms. I suggested a 3rd one which was based on selecting a lift call that is in the path of the current destination. He asked me to suggest yet another approach. I was pretty much out of ideas, as I had given all the possible options I could think of. I suggested to him an emergency-based approach in case of emergency but I knew it wasn’t practical and I mentioned that too.  
  8. How will you delete a node in a doubly-linked list? I could explain and code it with the help of my knowledge about the linked list. He was quite satisfied with my approach.

Finally, he cooled down the conversation and asked me to chill after a tiring day.

My advice to all the candidates who are going to appear for an interview in the coming weeks or months is to stay calm and confident during the entire process. You can deliver your best only when you are calm and composed. According to me, the companies not only test you on your technical knowledge but also on, how you interact during the interview and handle a difficult situation. Students generally focus on OOPs, DS/Algo, but I think preparing on topics like Operating Systems, Networking, and System Design will be really helpful in the interview process.  

The master tip to each and every aspirant is to keep interacting with the interviewer, think aloud so that the interviewer gets to know your approach.  

Thank you for reading the post. Hope you might have gained some knowledge by reading it. Cheers!


Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.