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

Software Engineer

Microsoft
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data structures, Algorithms, Dynamic programming, Arrays, Stacks, Queues, Linked lists, Trees, Graphs, OOPS
Tip
Tip

Tip 1 : Start practicing questions as early as possible and be consistent.
Tip 2 : Try to set time limit during practicing questions and making notes.
Tip 3 : Do side projects and explore open-source, volunteering in your areas of interest

Application process
Where: Campus
Eligibility: Second-year BTech female students
Resume Tip
Resume tip

Tip 1 : Make the resume genuine and put your real interests and projects.
Tip 2 : Mention the important things like your grades, contact information, achievements clearly and make it within one page if possible.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date1 Mar 2020
Coding problem2

The test could be attempted at any time within 24 hours and the time limit was of 1 hour.
It was held online.
Questions were mostly around basic knowledge of data structures and algorithms.

1. Sorting the stack recursively

Easy
0/40
Asked in companies
MicrosoftTCS

Ritik is stuck on a problem for the past few days. He has a stack 'S' of integers and his friend told him to sort the stack recursively.

Help Ritik to solve his problem so that he can show it off to his friend.

Note:
1. Looping through the stack is not allowed.
2. You need to return a stack that is sorted in descending order.
For example:
Given stack 'S' = 1 3 2 
The output will be 3 2 1 since it is the sorted order.
Try solving now

2. Wildcard Pattern Matching

Hard
50m average time
30% success
0/120
Asked in companies
SalesforceFreshworksWalmart

Given a text and a wildcard pattern of size N and M respectively, implement a wildcard pattern matching algorithm that finds if the wildcard pattern is matched with the text. The matching should cover the entire text not partial text.

The wildcard pattern can include the characters ‘?’ and ‘*’

 ‘?’ – matches any single character 
 ‘*’ – Matches any sequence of characters(sequence can be of length 0 or more)
Try solving now
02
Round
Medium
Group Discussion
Duration180 minutes
Interview date25 Mar 2020
Coding problem1

This round involved discussion and brainstorming to come up with a solution to a real life problem.
The candidates were divided into groups of 6-7. 
The theme of the round was Sustainable Development.
At the end of the time limit, the team was required to present their pitch and answer questions of the team mentors.

1. Group Discussion Problem

Is government doing the right thing by divesting public sector companies?

Problem approach

Tip 1 : Don't be impatient
Tip 2 : Produce facts
Tip 3 : Listen to others 

03
Round
Hard
Online Coding Test
Duration40 minutes
Interview date5 Apr 2020
Coding problem1

The test could be taken at any time within the day.
It was online round.
There was 1 questions based on DSA.

1. Reverse DLL nodes in groups

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

You are given a Doubly Linked List of integers and a positive integer 'K' representing the group size. Modify the linked list by reversing every group of 'K' nodes in the linked list.

A doubly linked list is a type of linked list that is bidirectional, that is, it can be traversed in both directions, forward and backward. 
Note:
If the number of nodes in the list or in the last group is less than K, just reverse the remaining nodes. 
Example:
Linked list: 8 9 10 11 12
K: 3 

Output: 10 9 8 12 11

We reverse the first K (3) nodes. Now, since the number of nodes remaining in the list (2) is less than K, we just reverse the remaining nodes (11 and 12).  
Try solving now
04
Round
Medium
Video Call
Duration45 minutes
Interview date19 Apr 2020
Coding problem1

The interview was around 9 am.
It was a video call technical interview.
The interviewer was friendly and welcoming. He started by introducing himself, I introduced myself in turn, then we went directly to the technical problem.
At the end I was allowed to ask questions i had for him.

1. Product Of Array Except Self

Easy
26m average time
0/40
Asked in companies
IntuitQualcommFacebook

You have been given an integer array/list (ARR) of size N. You have to return an array/list PRODUCT such that PRODUCT[i] is equal to the product of all the elements of ARR except ARR[i]

 Note :
Each product can cross the integer limits, so we should take modulo of the operation. 

Take MOD = 10^9 + 7 to always stay in the limits.
Follow up :
Can you try solving the problem in O(1) space?
Problem approach

1) The first solution that i thought of was performing two loops, one for every element in array and another for multiplying all the elements in the array except the ith element.
2) I shared that solution with the interviewer, he asked if I could further optimize it.
3) I decided to maintain two arrays, one for product of all elements left of ith element and another for product of all elements right of ith element multiplied by the left product of the ith element. So i did the solution in two individual O(n) loops. The time complexity of this solution is O(n).
4) I coded this solution and shared with the interviewer. He said it might not work at first ( to test) but then he was happy with the solution as it worked for all test cases.
5) For the second part of the suction, just iterating once through the final array would enable us to find the max product.
5) There was little time left after that, so I asked him questions related to career after that .

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
10147 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
4447 views
1 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by Amazon
3674 views
0 comments
0 upvotes