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

Software Engineer Intern

Microsoft
upvote
share-icon
4 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: Graphs, DP, Trees, Bit Manipulation, Stacks, Queues
Tip
Tip

Tip 1 : Do Mock Interviews before the actual Interview
Tip 2 : Always tell brute force before jumping into an optimized solution
Tip 3 : Don't panic in the interview.

Application process
Where: Campus
Eligibility: 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Always put your strengths at the top
Tip 2 : Make 1 page resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date7 Aug 2021
Coding problem1

2 Codeforces type questions. 
Duration - 90 mins

1. First Unique Character in a String

Easy
15m average time
85% success
0/40
Asked in companies
MicrosoftIBMLivekeeping (An IndiaMART Company)

Given a string ‘STR’ consisting of lower case English letters, the task is to find the first non-repeating character in the string and return it. If it doesn’t exist, return ‘#’.

For example:

For the input string 'abcab', the first non-repeating character is ‘c’. As depicted the character ‘a’ repeats at index 3 and character ‘b’ repeats at index 4. Hence we return the character ‘c’ present at index 2.
Problem approach

NA

Try solving now
02
Round
Easy
Video Call
Duration45 Minutes
Interview date10 Aug 2021
Coding problem1

1 medium Hard question on prefix sums.
Duration:- 45 mins

1. Maximum of All Subarrays of Size K

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

You are given an array “A” of N integers. Your task is to find the maximum element in all K sized contiguous subarrays from left to right.

For Example:
If A = [3, 2, 3], and K = 2.
Then max of [3, 2] = 3 and max of [2, 3] = 3
So, the answer will be [3, 3]

If A = [3, 2, 3, 5, 1, 7] and K = 3.
Then max of [3, 2, 3] = 3 
Then max of [2, 3, 5] = 5 
Then max of [3, 5, 1] = 5 
Then max of [5, 1, 7] = 7 
So  the answer will be [3, 5, 5, 7]
Follow Up :
Can you solve the problem in O(N) time complexity and O(K) space complexity?
Problem approach

Made a prefix sum array.
For every index i, subtracted the minimum value between (prefix[0.....i-1]) from prefix[i].

Try solving now
03
Round
Medium
Video Call
Duration45 mins
Interview date10 Aug 2021
Coding problem1

1 Tree medium-hard question.
Duration - 45 mins

1. LCA - Lowest Common Ancestor

Hard
40m average time
70% success
0/120
Asked in companies
AmazonDell TechnologiesDeutsche Bank

The lowest common ancestor (LCA) is a concept in graph theory and computer science.

Let ‘T’ be a rooted tree with ‘N’ nodes. The lowest common ancestor is defined between two nodes, ‘u’ and ‘v’, as the lowest node in ‘T’ that has both ‘u’ and ‘v’ as descendants (where we allow a node to be a descendant of itself). - Wikipedia

For the given tree, The LCA of nodes 5 and 8 will be node 2, as node 2 is the first node that lies in the path from node 5 to root node 1 and from node 8 to root node 1.

Path from node 5 to root node looks like 5 → 2 → 1.

Path from node 8 to root node looks like 8 → 6 → 2 → 1.

Since 2 is the first node that lies in both paths. Hence LCA will be 2.

Given any two nodes ‘u’ and ‘v’, find the LCA for the two nodes in the given Tree ‘T’.

Note: For each test case, the tree is rooted at node 1.

Problem approach

I first used both DFS and BFS to solve the problem and also wrote the code.
Then I explained the Binary lifting approach but was not asked to code.

Try solving now
04
Round
Easy
HR Round
Duration45 mins
Interview date10 Aug 2021
Coding problem1

Was asked about the projects in my resume and some behavioural questions

1. Basic HR questions

Why did you make this project?
What challenges you faced during making the projects?

Problem approach

Tip 1 : Always focus on the real-life impact of the 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 - Intern
3 rounds | 8 problems
Interviewed by Microsoft
2317 views
2 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Microsoft
7425 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Microsoft
1272 views
0 comments
0 upvotes
company logo
SWE-1
4 rounds | 7 problems
Interviewed by Microsoft
4485 views
1 comments
0 upvotes