Microsoft Interview Experience | 10th Feb

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-02-12Added By Anonymous
Source: Link

I had virtual interview with Microsoft last Saturday. It was a very different experience as I had 5 rounds and all rounds had DS/Algo.

Round 1:

1> Given a linked list with even and odd node values, separate odd and even values. Bring odd values to front of linked list in reverse order and even values should be towards end of linked list with same relative ordering.

2> Given a binary tree find all the nodes which are at a distance of K from the leaf nodes.

Round 2:

1> Given a number, find the power of 4 which is closest to it. Interviewer insisted on using bitwise operations.

2> Given an array consisting of positive, negative and zeros, find the find missing positive integer.

Round 3:

Asked general questions about the work I do at my company.

1> High Level Design Question (Don't want to share it here, as it was extending something I do at work)

2> Subset Sum problem.

Round 4:

Detailed discussion about the nature of work I do at my current company.

1> Given two sorted arrays, where one array is large enough to accommodate all numbers (with zeros at the end). Merge the sorted arrays.

Ex: 1 3 5 0 0 0 & 2 4 6 -> 1 2 3 4 5 6

Round 5:

Discussion on the High Level Design Problem which was asked in round 3. Asked about how will you make that system available and scalable.

Discussion on the work I did at my previous 2 companies.

Why Microsoft? Why should Microsoft choose you?

1> Given a binary tree (say which has unique integers). Given two numbers i & j, find sum of all the nodes which are at a distance j from the node having value i.

Arrived at an approach after having some discussion, was coding it and after watching for some time, interviewer told me he understands what I am trying to write and didn't ask me to write the full code. I don't know if this is positive or negative. Though he did say you were on the right track.


Fingers crossed.

YOE: 5.5+ yrs.

They mentioned before the interview that every round was an eliminator. Any idea why I was asked so many coding questions? Barring the bitwise question (for which I gave an iterative approach using bitshift, but he asked me whether this can be done in one operation), I was able to solve all the questions where for 2 questions interviewer asked me run test cases as well all of which passed.

Comments