Microsoft interview experience Real time questions & tips from candidates to crack your interview

SDE - 2

Microsoft
upvote
share-icon
5 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Journey
I am 2018 pass out and had applied for role of Software Engineer - 2(L61) at Microsoft in December 2021. I had actually interviewed simultaneously for three teams out of which I was given an offer for 2 teams.
Application story
I was referred to by my friend. Then HR contacted me and provided me a test link. Afterwards, three rounds of interviews were scheduled for Saturday. I was, however, rejected for this team, but HR scheduled interviews for another team, and there also three rounds were conducted, where I got the offer. Then another HR contacted me for yet another team (I guess there might have been some mix-up here), and there also I completed three rounds and was selected.
Why selected/rejected for the role?
I was very good at the system design round. I have a very deep understanding of making scalable, reliable systems. I also asked some good questions about team culture, the tech stack, and other things, which made the interviewer think that the candidate is also looking for a good company and is not desperate for any role offered.
Preparation
Duration: 3 months
Topics: Data Structures, System Design, Algorithms and Java
Tip
Tip

Tip 1: I would suggest to go through and mug up entire Geeks For Geeks.
Tip 2: For system design round, read up, understand, and mug up entire Grokking 
Tip 3: The above tips are purely for cracking the interview. But in order to be a good engineer, I would suggest that one should pick up one field, explore it till its depth and be the master of it and not only focus on your company's work. Your company's work might sometimes not lead you to becoming a better engineer.

Application process
Where: Referral
Eligibility: Nothing as of now. But I guess a good university, or a good current company or a good leetcode/github profile should be maintained
Resume Tip
Resume tip

Tip 1: Use Some resume scanning tool and get your resume reviewed by at least 2 - 3 seniors
Tip 2: As of now, you should use chat-gpt, jobscan and other AI tools to get you resume reviewed.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date3 Dec 2021
Coding problem2

First round was online round and had 2 questions.

1. KMP Algorithm for Pattern Searching

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftMakeMyTripWalmart

You are given two strings 'S' and 'P' consisting of lowercase English alphabets. Your task is to find whether the 'P' is present in 'S' as a substring or not.

Note
1. There may be more than one occurrence of 'P' in 'S'.
2. Some alphabets in the strings may be repeated.
Problem approach

I had remembered it, so, used its most optimized version.

Try solving now

2. Valid Sudoku

Moderate
40m average time
60% success
0/80
Asked in companies
QualcommUberDirecti

You have been given a 9 X 9 2D matrix 'MATRIX' with some cells filled with digits(1 - 9), and some empty cells (denoted by 0).

You need to find whether there exists a way to fill all the empty cells with some digit(1 - 9) such that the final matrix is a valid Sudoku solution.

A Sudoku solution must satisfy all the following conditions-

1. Each of the digits 1 - 9 must occur exactly once in each row.
2. Each of the digits 1 - 9 must occur exactly once in each column.
3. Each of the digits 1 - 9 must occur exactly once in each of the 9, 3 x 3 sub-matrices of the matrix.
Note
1. There will always be a cell in the matrix which is empty.
2. The given initial matrix will always be consistent according to the rules mentioned in the problem statement.
Try solving now
02
Round
Hard
Video Call
Duration90 minutes
Interview date21 Dec 2021
Coding problem2

Second round was F2F and 2 coding questions were asked.

1. Sorted Matrix

Moderate
25m average time
85% success
0/80
Asked in companies
MicrosoftAmazonFidelity International

You are given an N x N matrix 'MAT' of positive integers, where every row and column is sorted in non-decreasing order.

Your task is to return a list containing all elements of the matrix in sorted order.

For example :

If the matrix is:

10 20 30 40
15 20 35 42
27 29 37 46
32 33 38 49

The output will be the elements of matrix in sorted order:
10 15 20 20 27 29 30 32 33 35 37 38 40 42 46 49

Follow Up:

Can you solve this in O((N ^ 2) * log(N)) time and O(N) space complexity?
Problem approach

Initially, I gave the NXNlog N solution, but the interviewer asked me to provide a more optimized in-place one, which I was unable to remember.

Try solving now

2. Container with Maximum Water

Easy
10m average time
90% success
0/40
Asked in companies
OracleFacebookAmazon

You have been given an array/list ‘ARR‘ of length ‘N’ consisting of non-negative integers ARR1, ARR2, ..., ARRN. The i’th integer denotes a point with coordinates (i, ARR[i]). ‘N’ vertical lines are drawn such that the two endpoints of the i’th line are at (i, arr[i]) and (i,0).

Your task is to find two lines, which, together with the x-axis, form a container, such that the container contains the most water. Return the maximum area of the container.

Note:
1. Consider the container to be 2-dimensional for simplicity. 
2. For any pair of sides ignore all the lines that lie inside that pair of sides. 
3. You are not allowed to slant the container.

Example

Example:

Consider 'ARR'= {1,8,6,2,5,4,8,3,7} then the vertical lines are represented by the above image. The blue section denotes the maximum water than a container can contain.
Problem approach

I gave the most efficient solution in the first try itself ,since, I had practised it recently.

Try solving now
03
Round
Easy
Video Call
Duration120 minutes
Interview date21 Dec 2021
Coding problem1

I had to design online chess game

1. Design Question

Design online chess game

Problem approach

Tip 1: learn gorging and follow Gaurav sen.

04
Round
Medium
Video Call
Duration60 minutes
Interview date21 Dec 2021
Coding problem1

It was a culture fit and tech skills round taken by a director level person.

1. Project based Questions

General technical skills and projects were discussed

- Why did you use this particular tech stack?

- What challenges did you face?

05
Round
Medium
HR Round
Duration60 minutes
Interview date31 Dec 2021
Coding problem1

This was to test whether I was fit for a particular team or not and it was with the team's director.

1. Basic HR Questions

1. What would you do in this situation, a scenario was given?

2. What are your strengths?

3. What do you want to accomplish in life?

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
4 rounds | 4 problems
Interviewed by Microsoft
0 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 9 problems
Interviewed by Microsoft
2056 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Microsoft
1651 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Microsoft
7378 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29892 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6766 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5281 views
0 comments
0 upvotes