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

SDE - 2

Microsoft
upvote
share-icon
3 rounds | 9 Coding problems

Interview preparation journey

expand-icon
Journey
I did B. tech from a tier 3 college, cleared GATE, and joined DTU, a tier 2 college. I got selected in Siemens as a campus placement. Practiced competitive programming and landed a job at Microsoft.
Application story
I applied directly on microsoft website, no referral, nothing. I applied in the last week of january 2021 and in feb second week i got call for interview
Why selected/rejected for the role?
I got selected because even if I didn't know any answer, I still communicated with the panel, tried to understand the question, and then answered to the best of my knowledge. They don't look for 100% correctness; they look for someone willing to learn.
Preparation
Duration: 3 months
Topics: Data Structures, OOPS, System Design, Design patterns, Algorithms
Tip
Tip

Tip 1 : Don't stress, we have plenty of companies and plenty of chances to apply in any company
Tip 2 : Make short notes and do daily revision
Tip 3 : Be consistent with problem-solving and understand every topic completely

Application process
Where: Company Website
Resume Tip
Resume tip

Tip 1 : Contact details on the top
Tip 2 : Put experience first and then education, and it should be in descending order, most recent on the top and then so on  

Interview rounds

01
Round
Medium
Video Call
Duration70 minutes
Interview date27 Feb 2021
Coding problem5

Panel was super supportive, making me comfortable throughout. interview started around 3pm, got over by 4:10. they were concerned about time and space complexity.

1. Replace The Linked List

Moderate
10m average time
90% success
0/80
Asked in companies
MicrosoftJosh Technology Group

Given a linked list containing a series of numbers that are separated by ‘0’. You need to find the sum of the series and replace the series’s elements with its sum.

For Example :
If the given linked list is 3 ->4 ->0 ->5 ->0, you should return linked list as - 7 -> 5.
Note :
You need to replace the sum values in the linked list without using any extra space.

It is guaranteed that there will be no two consecutive zeroes in the linked list.
Try solving now

2. Theory Questions

What is render?(Learn

What is dispatcher?(Learn

Aggregation and composition?(Learn

GPU Programming?(Learn)

3. OS Questions

What are Threads?(Learn

What are Semaphore?(Learn

What are Mutexes? Why are they used?(Learn)

Problem approach

Tip 1 : Read Galvin for OS thoroughly.

4. Check for Mirror Trees

Moderate
0/80
Asked in companies
AmazonMicrosoftHashedIn

While learning DSA, Ninja found two N-ary trees and wants to check whether they are mirror images of each other or not. But, he can’t find a suitable method to check the same. Can you help Ninja to solve this problem?

You are given two N-ary trees, ‘TREEA’ and ‘TREEB’ having ‘N’ vertices labeled from 0 to ‘N’-1, and both the trees are rooted at node 0. Your task is to find whether the trees are mirror images of each other or not. Edges of the tree are in order from left to right.

For Example:
For the given example below, the trees are mirror images of each other.

Example

Problem approach

They asked for pseudo code, I gave answer, then they questioned on the complexity and test cases in which code will fail, later they asked how can we improve the complexity

Try solving now

5. Boundary Traversal of Binary Tree

Hard
20m average time
85% success
0/120
Asked in companies
Goldman SachsOYOExpedia Group

You are given a binary tree having 'n' nodes.


The boundary nodes of a binary tree include the nodes from the left and right boundaries and the leaf nodes, each node considered once.


Figure out the boundary nodes of this binary tree in an Anti-Clockwise direction starting from the root node.


Example :
Input: Consider the binary tree A as shown in the figure:

alt text

Output: [10, 5, 3, 7, 18, 25, 20]

Explanation: As shown in the figure

The nodes on the left boundary are [10, 5, 3]

The nodes on the right boundary are [10, 20, 25]

The leaf nodes are [3, 7, 18, 25].

Please note that nodes 3 and 25 appear in two places but are considered once.
Problem approach

They asked for pseudo code, i gave answer, then they questioned on the complexity and test cases in which code will fail, later they asked how can we improve the complexity

Try solving now
02
Round
Medium
Video Call
Duration80 minutes
Interview date27 Feb 2021
Coding problem1

Panel was super supportive, making me comfortable throughout. interview started around 4:30pm, got over by 5:50. asked a lot of questions on the type of data structures to use, also they were asking that assume we don't have concept of inheritance then how will we solve this problem and so on

1. System Design

Implement Visitor Pattern

Implement Singleton pattern

Difference between Singleton and Static. Implement them

What is Logger design? Implement it

Any other approach for logging other than singleton and static

How singleton is tightly coupled

Inheritance vs Association class - which one to choose - IS-A relationship choose inheritance, HAS-A choose association.

DB design

Implement No SQL based DB design

What is UML association?

Challenges faced while designing in office and my current project related questions

03
Round
Easy
Video Call
Duration60 minutes
Interview date27 Feb 2021
Coding problem3

Panel was super supportive, making me comfortable throughout. interview started around 6:20pm, got over by 7:20. this was Managerial Round

1. Basic HR Questions

What are your strengths and weakness? 

Cn you list some of the challenges faced? 

Are you willing to relocate? 

What kind of work are you looking for?
Why do you want to switch? 

If you will get similar work then what will you do? 

What are the challenges faced? 

What Complexity handled in current project?

2. Swap Nodes in Pairs

Moderate
40m average time
60% success
0/80
Asked in companies
Dell TechnologiesWalmartOLX Group

You are given a singly linked list of integers.

Your task is to swap every two adjacent nodes, and return the head of the modified, linked list.

For Example:

We have a linked list 1->2->3->4->5->6->7 and so on. You are supposed to swap pairs of a linked list like swap (1,2), (3,4), (5,6), and so on.
Note:
1. You may not modify the data in the list’s nodes; only nodes themselves may be changed. Because imagine a case where a node contains many fields, so there will be too much unnecessary swap.

2. If a pair of a node does not exist, then leave the node as it is.
Problem approach

I took examples and then explained the question, later wrote pseudo code

Try solving now

3. System Design

Implement MOQ, Nunit

Problem approach

Explained how we are utilizing it in the current project

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 | 5 problems
Interviewed by Microsoft
1650 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Microsoft
1649 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Microsoft
7377 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
29891 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6765 views
1 comments
0 upvotes
company logo
SDE - 2
6 rounds | 8 problems
Interviewed by Amazon
5280 views
0 comments
0 upvotes