Microsoft | SWE | April 2021 | Reject

Status: Final year student, Bachelor of Engineering
Current Position: Intern

Round 1: Resume Shortlisting

Round 2: Coding Test: There were three coding questions.

  1. Minimum number of jumps required to go from one postion to other on stairs. At a time, you can either go up by 'U' stairs or come down by 'D' stairs.
  2. Given an array and a sum, find whether that sum could be constructed from any sub-array and if it can be constructed then return the length of the subarray.
  3. There are 'N' students in a class. During the lunch period, the students want to exchange their food with other students. Since the number of students can be very high, each ith student can exchange food with (i/2)th student. Find the minimum number of exchanges required for a student 'A' to exhange food with student 'B'.

I was able to solve first 2 questions completely and 3rd question partially.

I received a call after 2 days that my profile has been shortlisted for interviews. There were 3 rounds of interview - 2 Technical and 1 Technical and HR.

Interview Round 1: Started with the introduction by the interviewer and then he asked me to introduce myself. After that he started with the coding questions:

  1. Given a string, find the length of the longest substring which has atmost 'k' unique characters.
  2. Given 'k' sorted arrays, find the shortest range such that atleast one element from each array can fall in that range.

I was able to solve the first question completely and second question partially.

I received an email half an hour later that I have been shortlisted for the next round. Next round was also on the same day.

Interview Round 2: In this round, the interviewer started directly with the coding question. The question was:
You are given a list of pairs of names as an input, where the first name in the pair was a child of the second name in that pair. After that, a list of pairs of names was given and you need to find the relationship between the names of each pair. We need to print the relationship with respect to how 1st name is related to 2nd name, like following:
parent
child
grandparent
great grandparent
great great grandparent
cousin

I was not able to solve this question and hence was rejected after this round. :(
If anyone can help me with this question, then it would be great!

Thanks

Comments (6)