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

SDE - Intern

Microsoft
upvote
share-icon
5 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data Structures and Algorithms, OOPS, DBMS, System Designing, Computer Networks, OS, Debugging of a program (C/C++/Java), Working with pointers.
Tip
Tip

Tip 1 : Start with making your basics strong about programming, which included basic data structures like array, linked list etc.
Tip 2 : Practice dry running the code with custom test cases, try to find the edge cases by yourself
Tip 3: Do not search for a solution until you have tried your best to think of it
Tip 3 : For reference you can reach to Interview Preparation Course of Coding Ninjas

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

Tip 1: Have at-least one good project on resume, keep it to the point and do not fake it.
Tip 2: Add the skills section to your resume properly, highlight what's needed.

Interview rounds

01
Round
Easy
Online Coding Test
Duration75 minutes
Interview date31 Jul 2018
Coding problem3

First-round was online round on CoCubes and there were three coding questions (2, 3 and 5 marks). The test was held in the institute's computer center and there were 6 sets of coding question, out of which one was assigned to you randomly. If you have completed all the questions, it is a very high probability that you will advance to next round.

1. Minimum subarray with required sum.

Moderate
18m average time
85% success
0/80
Asked in companies
MyntraFacebookGoldman Sachs

You have been given an array(ARR) of positive integers and an integer X. You have to find the minimum length subarray such that the sum of all of its elements is strictly greater than the given integer X.

Note:
A subarray is a contiguous block of elements that can be formed by deleting some (possibly zero) elements from the beginning or the end of the original array. 
For example :
If the given array is [1, 2, 3, 4, 5], then [2, 3, 4], [1, 2], [5] are some subarrays while [1, 3], [2, 3, 5] are not.

If there are multiple subarrays with minimum length, find one which appears earlier in the array (i.e. subarray that starts with lower index).

If there is no such subarray, print an empty line.
Problem approach

I initially did it using maps in c++ but in the end reduced the space to complexity to O(1) using three pointer approach.

Try solving now

2. Reverse a Linked List.

Moderate
15m average time
85% success
0/80
Asked in companies
GE (General Electric)Tata 1mgFreshworks

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

It's a standard linked list question, used recursion to solve this.

Try solving now

3. Largest Common Ancestor

Moderate
35m average time
55% success
0/80
Asked in companies
SamsungMicrosoftAmazon

Given a binary search tree and two nodes, find their largest common ancestor.

Largest Common Ancestor is the one having the highest node value among all the common ancestors of given nodes. Assume both nodes are present in the binary tree.

Try solving now
02
Round
Medium
Coding Test - Pen and paper
Duration60 minutes
Interview date31 Jul 2018
Coding problem1

There were a few debugging problems in which we need to figure the bugs in the code. In the end there was a programming question for which we need to write a pseudo code.

1. Palindrome Partitioning

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

You are given a string 'S'. Your task is to partition 'S' such that every substring of the partition is a palindrome. You need to return all possible palindrome partitioning of 'S'.

Note: A substring is a contiguous segment of a string.

For Example:
For a given string “BaaB”
3 possible palindrome partitioning of the given string are:
{“B”, “a”, “a”, “B”}
{“B”, “aa”, “B”}
{“BaaB”}
Every substring of all the above partitions of “BaaB” is a palindrome.
Problem approach

I used DP for this question, as it was a subjective round, I explained my approach using a testcase.

Try solving now
03
Round
Medium
Face to Face
Duration30 minutes
Interview date31 Jul 2018
Coding problem1

The interviews started during evening. In this round i was asked to introduce myself and describe a project that was listed on the resume. There were questions related to the technical details of the project, for example what is the tech stack that was used. After this i was asked to solve a programming question which was fairly simple

1. Ways To Make Coin Change

Moderate
20m average time
80% success
0/80
Asked in companies
SamsungThought WorksApple

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change for value V using coins of denominations from D. Print 0, if a change isn't possible.

Try solving now
04
Round
Easy
Face to Face
Duration40 minutes
Interview date31 Jul 2018
Coding problem1

In this round I was asked to solve 1 programming question and needed to improve the solution to reduce both space and time complexity.

1. Flatten The Multi-Level Linked List.

Moderate
10m average time
80% success
0/80
Asked in companies
AmazonGoldman SachsMicrosoft

You are given a multi-level linked list of 'N' nodes, each node has a next and child pointer which may or may not point to a separate node. Flatten the multi-level linked list into a singly linked list. You need to return the head of the updated linked list.

Example:

Sample Multi-Level

Flatten :

All the different rows are merged into a single row.
Try solving now
05
Round
Medium
Face to Face
Duration30 minutes
Interview date31 Jul 2018
Coding problem1

It was a pretty interesting round, in which i was asked to design a solution for real life situation.

1. Weighted Job Scheduling

Moderate
15m average time
85% success
0/80
Asked in companies
MeeshoGoogleGoldman Sachs

You are given 'N' jobs with their start time 'Start', end time 'End' and profit 'Profit'. You need to tell the maximum profit you can obtain by performing these jobs such that no two jobs overlap.

Note:
The start time of one job can be equal to the end time of another.
Problem approach

I didn’t have to code it but I had to explain to him the approach and which Data structure should be used. I gave him a DFS based approach and using a map for cache.

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

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
3 rounds | 8 problems
Interviewed by Microsoft
1745 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
1040 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 5 problems
Interviewed by Microsoft
1566 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Microsoft
223 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13855 views
4 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
9196 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Amazon
6067 views
3 comments
0 upvotes