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

SDE - 2

Microsoft
upvote
share-icon
5 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, LLD, HLD, Behavioural Questions
Tip
Tip

Tip 1 : Good knowledge of each data structure, so that you can apply then on any new problem.
Tip 2 : Give importance to behavioral questions as well.
Tip 3 : Give mock interviews in time bounded way.

Application process
Where: Referral
Eligibility: 3+ year of exp for the role I applied
Resume Tip
Resume tip

Tip 1: Mention what you know properly. In each round they can ask to explain any project that you mentioned in the resume.
Tip 2: Mention achievements in the first half of the resume. Suggested by one HR,

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 mins
Interview date25 Oct 2022
Coding problem2

There were 2 coding questions first one is easy-medium and second one is medium-hard level.

1. Fractional Knapsack

Easy
15m average time
85% success
0/40
Asked in companies
FlipkartMicrosoftSwiggy

You have been given weights and values of ‘N’ items. You are also given a knapsack of size ‘W’.

Your task is to put the items in the knapsack such that the total value of items in the knapsack is maximum.

Note:
You are allowed to break the items.
Example:
If 'N = 4' and 'W = 10'. The weights and values of items are weights = [6, 1, 5, 3] and values = [3, 6, 1, 4]. 
Then the best way to fill the knapsack is to choose items with weight 6, 1 and  3. The total value of knapsack = 3 + 6 + 4 = 13.00   
Problem approach

I solved the problem by applying greedy algorithm

Try solving now

2. Course Schedule

Easy
15m average time
85% success
0/40
Asked in companies
UberPaytm (One97 Communications Limited)Apple

You are a student of Netaji Subhas Institute of Technology. You have to take ‘N’ number of courses labelled from 1 to N to complete your B.Tech Degree.

Some courses may have prerequisites, for example, to take course 1 you have to first take course 2, which is expressed as a pair: [1, 2]. Now, your task is to find is it possible for you to finish all courses.

Note: There are no duplicate pairs in the prerequisites array.

For example-
If N = 2 and prerequisite = [[1, 2]]. Then, there are a total of 2 courses you need to take. To take course 1 you need to finish course 2. So, it is possible to complete all courses. 
Problem approach

Applying topological sort can solve the problem

Try solving now
02
Round
Medium
Face to Face
Duration60 mins
Interview date27 Oct 2022
Coding problem1

Early morning interview. Interview started with in depth project discussion then one coding problem.

1. Capture region

Moderate
10m average time
90% success
0/80
Asked in companies
MicrosoftSwiggyHSBC

You are given a matrix having ‘N’ rows and ‘M’ columns. Each cell of the matrix is either ‘X’ or ‘O’. You need to flip all those regions of ‘O’ which are surrounded by ‘X’ i.e. you need to change all ‘O’s which are present in the region to ‘X’.

Note
1. Surrounded regions shouldn’t be on the border, which means that any 'O' on the border of the matrix is not flipped to 'X'. 
2. Any ‘O’ or group of connected ‘O’ are said to be surrounded by ‘X’ when all cells touching the boundary of the group of ‘O’ must contain ‘X’.
For example

alt text

Problem approach

This can be solved using the bfs algorithm. But keep in mind in writing the modular and clean code. 
Handle the egde cases . Do the dry run on the one or two testcases.

Try solving now
03
Round
Medium
Face to Face
Duration60 mins
Interview date27 Oct 2022
Coding problem1

More towards the LLD and problem solving round

1. System design question

Design a scalable cache system. 
This is a LLD + problem solving round. Design all the classes and write the algorithm for cache.

Problem approach

Tip 1: Class design in such a way that they follow the SOLID principle. Mention them if you are focussing on them.
Tip 2: Algorithm of cache in such a way you can tell why you are using a particular data structrue.
Tip 3: Keep telling about why of the things you are doing while designing the class like composition over inheritance.

04
Round
Medium
Face to Face
Duration60 mins
Interview date27 Oct 2022
Coding problem1

Project discussion + LLD probelm.

1. Design question

Design election result computation system kind of problem.
Class design and algorithm writing for the same.

Problem approach

Tip 1: Problem is open ended. So get the complete clarity of the problem and tell your understanding before jumping on the design.
Tip 2: More focus on extensible and clean design.

05
Round
Medium
Face to Face
Duration60 mins
Interview date28 Oct 2022
Coding problem1

Projects discussion, behavioural questions, multi-threading problem solving

1. OS Questions

Discussion on mutex, semaphores, threads.
A problem on multi-threading system. By using multi-threading how you can achieve a task more efficiently.

Problem approach

Tip 1: Explain them how you have used them in your projects. 
Tip 2: Take the hints if you are stuck. 

Here's your problem of the day

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

Skill covered: Programming

Which array operation has O(n) worst-case time complexity?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 2
3 rounds | 9 problems
Interviewed by Microsoft
1392 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Microsoft
1195 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Microsoft
1012 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Microsoft
5425 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
25929 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
5652 views
0 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
4094 views
0 comments
0 upvotes