Preparing for an interview? Check out Cracking the Coding Interview
Published on

Microsoft | L62 | Brain cooked

Author
  • Shared Anonymously

Previous company : Another FAANG
Location : India
Reason for change : Bad team, bad culture

Interview Process feedback:
My interviews were expected to happen in Feb 2024 start but it took them 2 months to actually schedule them and ultimately the rounds happened in Aoril.
Delay in the microsoft interview process is quite common. I had similar experience 2 years back. That time I did clear Microsoft and got the offer but did not join Microsoft because I got offer from one of the FAANG companies which was offering way better compensation.

Round 1:
Question: Given a 2D matrix, where digits are present as values. If 1 occurs anywhere in the matrix and its neighbour (up, down, left , right) is 2 then change the neighbour (i.e. 2) to 1 as well and repeat the process. Return the updated matrix.

Answer: This is a simple BFS question. I implemented it easily. Interviewer then went ahead to ask why did I not use DFS and its pros/cons etc.
Since I had some time left, he asked some question similar to https://leetcode.com/problems/integer-break/description/. Was asked not to implement it but discuss. I remember the fundamentals of Euler's number so it was easy for me. I went ahead and implemented it anyways in 4 lines of code.

Verdict: Strong hire

Round 2:
The interviewer in this round seemed really weird. As per him, O(2n) is not equal to O(n) . He did not know what is meant by asymptotic notation.
Anyway, lets come to the question.

Question: Given a 2d array containing only 0s and 1s, I was asked to sort it in a single pass.
Size of all rows is same.
Eg :
{{1,0,1},
{0,0,0}.
{1,1,0}}

becomes

{{0,0,0},
{0,0,1}.
{1,1,1}}

I was asked to implement this in a single pass, else I would have counted the sum of all the 1s and in another pass populated the array.

The interviewer said that I only need to tell the approach and only need to write psudo code. No need to run it.
My suggestion: Always run your code and don't listen to them. Because someone definitely will run it and he/she will be selected.

Answer: I took 3-4 mins to think and fortunately came up with a 2 pointer approach with one pointer starting from top left and another starting from bottom right. Then I did compare and swap.
The interviewer seemed impressed and asked me to implement.
I took 10 mins to write code but did some silly mistake in the code. Basically, some j variable was replaced with i variable by mistake. My code run was failing but the interviewer said that it is alright. Not much time was given to correct it. I had 20 mins left but still the interviewer decided to call it off.
I thought the interviewer is happy but I was wrong.

Verdict: Reject

Round 3:

This is the round where I was cooked. I got a string hard question. Atleast for me it was hard.
The thing about string questions is that I can solve them but never on time. Similar thing happened with me in one of the Google interviews.

Question. Given a string containing only letters (a-z), find the sum of all the numbers which are also present as words. Do this in linear time, O(n) where n is the length of the string.

Eg : rwffonewofnwthreeonefourfrnwnminusonesix = 1 + 314 - 16 = 299
Note the numbers in the string : rwffonewofnwthreeonefourfrnwnminusonesix

Answer: I did happen to implement a solution for single digit use case. Could not implement for numbers greater than 9 like 314 in this case. I was brain cooked.

Verdict: Reject

What do you guys think ? Is this a hard question?

Suggestions:

  • Always be proactive. Try to do beyond the expected.

About me:
I already have offers from multiple companies but not from any FAANG yet. I might join a crypto firm.

Update:
Cleared all other Tier 1 companies I appeared for including multiple FAANG.
Will keep adding the anonymous posts for the same.

Upcoming:

  • Struggles of a FAANG engineer:
    Everyone talks about the perks of a FAANG engineer, but I feel no one talks about how hard it is to change jobs once you have joined a FAANG company. I will share my experience in an upcoming post. I also invite other fellow coders to share the same.

Keep grinding friends.....

ReportMark as Helpful