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

Software Engineer

Microsoft
upvote
share-icon
1 rounds | 1 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: OOPS Concepts, DS & Algo (Array, LinkedList, Tree, String, Stack, Queue, Dynamic Programming), High Level System Design (Different AWS services like EC2, API Gateway, Load Balancer, Auto Scaling Group, RDS, S3 bucket ) Low Level System Design- ( Design patterns - Singleton, Factory, Strategy, Class Diagram, Activity Diagram ) Database concepts ( ACID properties, CAP theorem, SQL queries ).
Tip
Tip

Tip 1 : Practice at least 10-20 questions of DS & Also on each topic from difficulty level easy to hard.
Tip 2 : Prepare well around OOPs concepts and Database concepts.
Tip 3 : If you have 2.5+ year of experience practice around HLD and LLD.

Application process
Where: Campus
Eligibility: No Criteria
Resume Tip
Resume tip

Tip 1 : Have some certification in the resume.
Tip 2 : Mention the proper keyword as per the role you are applying.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date31 May 2021
Coding problem1

Overall the first round was for 1h. At start interviewer introduced himself and asked for my introduction. Interviewer was having almost 10+ years of experience. After the introduction she directly jumped to coding problem. She gave me the problem and asked me to give working solution for the problem.

1. Populating Next Right Pointers In Each Node

Moderate
25m average time
75% success
0/80
Asked in companies
AmazonMathworksMorgan Stanley

You have been given a complete binary tree of ‘N’ nodes. The nodes are numbered 1 to ‘N’.

You need to find the ‘next’ node that is immediately right in the level order form for each node in the given tree.

Note :

1. A complete binary tree is a binary tree in which nodes at all levels except the last level have two children and nodes at the last level have 0 children.
2. Node ‘U’ is said to be the next node of ‘V’ if and only if  ‘U’ is just next to ‘V’ in tree representation.
3. Particularly root node and rightmost nodes have ‘next’ node equal to ‘Null’ 
4. Each node of the binary tree has three-pointers, ‘left’, ‘right’, and ‘next’. Here ‘left’ and ‘right’ are the children of node and ‘next’ is one extra pointer that we need to update.

For Example :

1

The‘next’ node for ‘1’ is ‘Null’, ‘2’ has ‘next’ node ‘6’, ‘5’ has ‘next’ node ‘3’, For the rest of the nodes check below.

1

Problem approach

Step 1 : Do the level order traversal. 
Step 2 : At each level do the reverse level order traversal and keep track on previously visited node.
Step 3 : At each node set the next to the previously visited node.

Try solving now

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
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
10148 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 2 problems
Interviewed by Microsoft
2134 views
0 comments
0 upvotes
company logo
Software Engineer
4 rounds | 6 problems
Interviewed by Microsoft
1692 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Microsoft
1116 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7976 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4448 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes