Open In App

Microsoft Interview Experience (Off-Campus)

Microsoft off-campus hiring interview experience, I got this opportunity through the Microsoft engage program 2021.

Round1 ( Coding Round on Codility ): There were two questions to be solved in 120 mins. Questions were medium-hard level.



  1. This question was based on multi-source BFS. A graph was given and an array of hospitals, now for all non – hospital nodes, we need to find the max time an ambulance may take to reach them. ( medium-hard )
  2. This question was based on Graph DFS + DP. Don’t remember the question exactly, but it was to apply the inclusion-exclusion principle on graph nodes using DFS. ( hard )

I was able to solve both the questions and passed all the given test cases within 60 mins. It was mentioned that code would be judged after submission for hidden test cases as well. 

Round 2 ( Interview Round 1 on Teams ): This round lasted for about 45 mins. I was asked 2 coding problems. 



  1. Zero Subarray sum, earlier he asked for a bool value, then he asked me to return starting and ending indices of all such subarrays.
  2. A binary tree is given, node value can be either 0 or 1. Now moving from root to a leaf forms a decimal number in binary representation. I was asked to find the sum of all such possible decimal numbers. All such possible numbers would be equal to the number of leaf nodes present in the binary tree.

I was able to solve the first one quickly, then the second one with some hints from the interviewer. I was asked to write code in my favorite editor and run the code for some test cases. The interviewer was satisfied at the end and he asked whether I had any questions for him. Within half an hour I received the call for my second round.

Round 3 ( Interview Round 2 on Teams ): This round lasted for about 50 mins. I was asked 2 coding problems.

  1. Cutting a rod problem was asked, I explained the overlapping subproblems first and the optimized using DP. I was asked to run the code and check for many test cases( including the edge cases ). The interviewer was satisfied with the code, then he said we have time so let’s solve another question.
  2. String question DP + Rabin Karp Hashing. Given a vector of strings, and a target string, find whether a subset of the array of strings could concatenate to target string, if more than one possible way, return the one with minimum elements in the subset. I explained to him first how hashing would help in comparing then overlapping subproblems while making the target string. Then I was asked to write the code for the same.

The interviewer looked happy after I solved both the questions, So I was pretty sure that I would qualify for the next round.

Rond 4 ( Interview Round 3 on Teams ): This round was conducted after 4 days of the previous two rounds. 

In the evening time on the same day, I got the mail that I have been selected. I was so happy and started celebrating.

Tips for Coding Round – 

Tips for Interviews – 

I hope this helps !! 

Article Tags :