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

Software Engineer

Microsoft
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I was introduced to the field of computer science in class 11th. I found it interesting and decided to pursue my career in the same field. I was admitted to B.Tech CSE and learned various concepts like DSA and all. I was advised that DSA. is a must for getting placed, so I started practicing it on a daily basis. I practised rigorously from various platforms.
Application story
I came to know from an email that this Top MNC company is visiting our campus for a placement opportunity. So, I decided to give a try and I applied for it.
Why selected/rejected for the role?
I think my skills and problem-solving ability was up to the mark, hence they found me as a valuable candidate. Moreover, my communication skills were decent, so that was a cherry on top.
Preparation
Duration: 4 Months
Topics: data structure and algorithm, operating system, DBMS, networks, oops, backtracking
Tip
Tip

Tip 1 : Prepare for common interview questions
Tip 2 : Practice, practice, practice.

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

Tip 1 : Should have different projects
Tip 2 : Internships in good companies

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 Minutes
Interview date11 Jan 2022
Coding problem1

1. Find All Triplets With Zero Sum

Moderate
30m average time
50% success
0/80
Asked in companies
MicrosoftFacebookDunzo

You are given an array Arr consisting of n integers, you need to find all the distinct triplets present in the array which adds up to zero.

An array is said to have a triplet {arr[i], arr[j], arr[k]} with 0 sum if there exists three indices i, j and k such that i!=j, j!=k and i!=k and arr[i] + arr[j] + arr[k] = 0.

Note :
1. You can return the list of values in any order. For example, if a valid triplet is {1, 2, -3}, then (2, -3, 1), (-3, 2, 1) etc is also valid triplet. Also, the ordering of different triplets can be random i.e if there are more than one valid triplets, you can return them in any order.
2. The elements in the array need not be distinct.
3. If no such triplet is present in the array, then return an empty list, and the output printed for such a test case will be "-1".
Try solving now
02
Round
Medium
Face to Face
Duration60 Minutes
Interview date11 Jan 2022
Coding problem2

1. Generate all binary strings from pattern

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

You're given a string 'STR' containing ‘0’, ‘1’ and ‘?’ special characters. Your task is to generate all the strings that are possible by replacing the special character ‘?’, with either of the characters ‘0’ or ‘1’.

Try solving now

2. Sum root to leaf

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftUnacademyMorgan Stanley

You are given an arbitrary binary tree consisting of N nodes where each node is associated with a certain integer value from 1 to 9. Consider each root to leaf path as a number.

For example:

       1
      /  \
     2    3

The root to leaf path 1->2 represents the number 12.
The root to leaf path 1->3 represents the number 13.

Your task is to find the total sum of all the possible root to leaf paths.

In the above example,

The total sum of all the possible root to leaf paths is 12+13 = 25
Note:
The output may be very large, return the answer after taking modulus with (10^9+7).
Try solving now
03
Round
Hard
Online Coding Test
Duration45 Minutes
Interview date12 Jan 2022
Coding problem1

1. The Celebrity Problem

Moderate
30m average time
60% success
0/80
Asked in companies
OlaVisaApple

There are ‘N’ people at a party. Each person has been assigned a unique id between 0 to 'N' - 1(both inclusive). A celebrity is a person who is known to everyone but does not know anyone at the party.

Given a helper function ‘knows(A, B)’, It will returns "true" if the person having id ‘A’ know the person having id ‘B’ in the party, "false" otherwise. Your task is to find out the celebrity at the party. Print the id of the celebrity, if there is no celebrity at the party then print -1.

Note:
1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
Try solving now
04
Round
Medium
Face to Face
Duration30 Minutes
Interview date12 Jan 2022
Coding problem2

1. OS Questions

What are the different operating systems? Batched operating systems
Distributed operating systems
Timesharing operating systems
Multi-programmed operating systems
Real-time operating systems

2. SQL Question

Write an SQL query to fetch records that are present in one table but not in another table

SELECT * FROM EmployeeSalary
MINUS
SELECT * FROM ManagerSalary;

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
5 rounds | 8 problems
Interviewed by Microsoft
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 2 problems
Interviewed by Microsoft
2134 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