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

SDE - Intern

Microsoft
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I took admitted to MNIT college in the computer science stream. MNIT college is renowned and well-known. My seniors advised me to practice DSA from the very start of B.Tech, and I did not take that seriously. Honestly speaking, I regretted not taking their advice, and in the last of my second year, I started coding, and I had to increase practice hours because I started late.
Application story
I got to know about this opening through a LinkedIn post. I applied to the post and looked at some important questions for Microsoft and started practicing for that. After a few days, I got a mail that I will be having an assessment test after which the final HR round will take place.
Why selected/rejected for the role?
I was confident during the full interview process. Actually, I worked a lot on my communications skills and I think they were the main reasons for me getting par the selection process.
Preparation
Duration: 7 months
Topics: Data Structures and Algorithms, OOPS, System Design, DBMS, Operating System, Pointers, Hashing
Tip
Tip

Tip 1 : Practice all DSA questions from interview bit
Tip 2 : Do Atleast 3 project one should be major, if it's in web dev it would be beneficial.
Tip 3 : Should be good in communication skills

Application process
Where: Other
Eligibility: Computer science and it's related branch
Resume Tip
Resume tip

Tip 1 : Not more than 1 page
Tip 2 : Have atleast 3 projects with some achievement in coding contest and your coding handle should be mentioned like codechef, codeforces etc
Tip 3 : Try to keep only those things in resume in which you find yourself comfortable with

Interview rounds

01
Round
Hard
Online Coding Interview
Duration75 minutes
Interview date10 Dec 2020
Coding problem2

This round was scheduled in the evening hours and all the participants were required to fill a form which was shared 2 days prior to the test date. This form was filled out probably for the security reasons and to ensure that no one disinterested participant gives the test.

1. Validate BST

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAmazonMicrosoft

Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is said to be a Partial BST if it follows the following properties.

• The left subtree of a node contains only nodes with data less than and equal to the node’s data.
• The right subtree of a node contains only nodes with data greater than and equal to the node’s data.
• Both the left and right subtrees must also be partial binary search trees.
Example:

Input:

BST1

Answer:

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtree for node 5 is empty.

Level 3:

For node 1:
The left and right subtree for node 1 are empty.
For node 3:
The left and right subtree for node 3 are empty.
Because all the nodes follow the property of a Partial binary 
search tree, the above tree is a Partial binary search tree.
Try solving now

2. Longest Palindromic Subsequence

Hard
45m average time
50% success
0/120
Asked in companies
SAP LabsCIS - Cyber InfrastructureIBM

You have been given a string ‘A’ consisting of lower case English letters. Your task is to find the length of the longest palindromic subsequence in ‘A’.

A subsequence is a sequence generated from a string after deleting some or no characters of the string without changing the order of the remaining string characters. (i.e. “ace” is a subsequence of “abcde” while “aec” is not).

A string is said to be palindrome if the reverse of the string is the same as the actual string. For example, “abba” is a palindrome, but “abbc” is not a palindrome.

Try solving now
02
Round
Medium
HR Round
Duration45 minutes
Interview date5 Jan 2021
Coding problem2

There was only one female interviewer for this round. She continuously interacted with me and was giving me some good situational problems that were not very easy to answer. Basically those were open-minded questions which can be answered both ways and that's why I found it quiet hard as per my nature but at the end things went well for me.

1. There are 5 lanes on a race track. One needs to find out the 3 fastest horses among total of 25. Find out the minimum number of races to be conducted in order to determine the fastest three.

Problem approach

 

The approach entails conducting 5 races where each race group would involve 5 horses. In the ensuing step, a sixth race is conducted between winners of first 5 races to determine the 3 fastest horses (marked A1, B1, A=and C1). The seventh race is conducted between horses B1, C1, second and third horse from the horse A1’s group (A2, A3), second horse from horse B1’s group (B2). The horses that finish 1st and 2nd in the seventh race, are actually the 2nd and the 3rd fastest horses among all horses.

 

2. Train collision puzzle

Two trains, separated by a distance of 80km, are running towards each other on the same track at a speed of 40 kmph. A bird takes its flight from train X and flies towards train Y at a constant speed of 100 kmph. Once it reaches train Y, it turns and start flying back toward strain X. The bird keeps flying to and forth till both the trains collide. Determine the distance travelled by the bird.

 

 

Problem approach

Velocity of approach for two trains = (40+40)km/hr

Time taken for the trains to collide = 80km/80km/hr = 1hour

The total distance travelled by the bird = 100km/hr * 1hr = 100km

Through this puzzle, the interviewer is testing your approach. Consider yourself rejected if the approach you took involves calculating distance from X to Y, and then Y to X, and so on.
 

Note: Basically it's better if you have seen some puzzles before any HR round since they will give you an idea of what kind of problem you may encounter and then you can ace any difficult to difficult HR interview.
 

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 8 problems
Interviewed by Microsoft
2273 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
1325 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 5 problems
Interviewed by Microsoft
1960 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Microsoft
596 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15480 views
4 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10142 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Amazon
6357 views
3 comments
0 upvotes