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

SDE - Intern

Microsoft
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, Operating Systems, OOPS
Tip
Tip

Tip 1 : Focus on basic concepts while studying algorithms and data structures. On the other hand, there is some amount of mugging required in other topics like operating systems and OOPS.
Tip 2 : Your resume should be catchy and impressive. The recruiters will not be looking at your resume for more than 30-40 seconds, so try to mention some numbers (ranks in some coding events, GPA) which can impress the recruiters.
Tip 3 : For the last few days before your interviews, it is advised to read some previous interview experiences of the company for which you are about the give the interview.

Application process
Where: Campus
Eligibility: 8.00 GPA
Resume Tip
Resume tip

Tip 1 : Try to mention some numbers on your resume like ranks in various coding events, or engineering entrance exams because this makes it somewhat catchy. 
Tip 2 : Try to know everything you've written on your resume. So, don't try to put false things as it can go against you in the interview.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date8 Aug 2020
Coding problem3

It started in the evening from around 6 pm and the total duration was 90 minutes. There were 3 coding questions of medium difficulty level. I think from a set of 10-12 questions, each student was given 3 questions randomly from that set. So it was somewhat luck dependent too if you get easy or difficult questions. Tab switching was not allowed during the test, also it was proctored through webcam.

1. Longest Palindromic Subsequence

Hard
45m average time
50% success
0/120
Asked in companies
QualcommHikeSAP Labs

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

2. Find K’th Character of Decrypted String

Moderate
33m average time
0/80
Asked in companies
OptumAtlassianAdobe

You have been given an Encrypted String where repetitions of substrings are represented as substring followed by the count of substrings.

Example: String "aabbbcdcdcd" will be encrypted as "a2b3cd3".

You need to find the 'K'th character of Decrypted String. Decrypted String would have 1-based indexing.

Note :

Input string will always be lowercase characters without any spaces.

If the count of a substring is 1 then also it will be followed by Integer '1'.
Example: "aabcdee" will be Encrypted as "a2bcd1e2"
This means it's guaranteed that each substring is followed by some Integer.

Also, the frequency of encrypted substring can be of more than one digit. For example, in "ab12c3", ab is repeated 12 times. No leading 0 is present in the frequency of substring.

The frequency of a repeated substring can also be in parts.
Example: "aaaabbbb" can also have "a2a2b3b1" as Encrypted String.
Try solving now

3. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
QualcommUberAmazon

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Try solving now
02
Round
Medium
Video Call
Duration50 minutes
Interview date14 Aug 2020
Coding problem2

It was held on the Microsoft teams platform. It started at 5 pm in the evening and lasted till around 5:50 pm. It started with me giving a general introduction about what I had done till now in my college. After that, he started with the coding problems.

1. Total area of overlapping rectangles

Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftSAP LabsOracle

You are given two arbitrary rectangles on a 2-D coordinate plane, which may have an intersecting area. You have to find the net area covered by both the rectangles on the cartesian plane.

explain_image

The orange area depicted in the above figure is the net area covered by both rectangles on the cartesian plane.

Note:

1. For a rectangle, its top left and bottom right coordinates are given.

2. Coordinates of the rectangles are integer values.

3. Edges of the given rectangles will always be parallel to the X and Y coordinate axes of the cartesian plane.

4. It is guaranteed that both the rectangles will have at least a unit area.
Problem approach

t was a general observation problem that required analysis of all possible cases in which the two rectangles could be oriented. I explained to him all cases by drawing the figures of all the possible cases on MS paint (my screen sharing was on).

Try solving now

2. OS Questions

A basic theory question about mutex and semaphores.

Problem approach

Tip 1: Don't leave topics like operating systems, OOPS, etc. There are some amazing youtube playlists for them through which I studied them.

03
Round
Easy
Video Call
Duration50 minutes
Interview date14 Aug 2020
Coding problem1

The pattern was similar to the previous round. I started with my general introduction after which he proceeded to problem-solving. Also, there was some discussion about the projects I had done previously and also about my previous internship experience.

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".
Problem approach

It was kind of a standard problem if you know basic STL. I used unordered maps to solve it in O(n*n).

Try solving now
04
Round
Medium
Video Call
Duration70 minutes
Interview date14 Nov 2020
Coding problem0

All three interview rounds were conducted on the same day so by the time this round started, it was already around 11:30 pm. And it lasted a bit longer than previous rounds about 70 minutes or so. It started with a basic introduction and the interview also asked about my interests and how I spend my time at college. There was a discussion about my previous intern experience as well. At this point, I thought it was just a formality round and it would not involve and problem-solving but then he asked me to code for a problem.

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
SDE - Intern
3 rounds | 8 problems
Interviewed by Microsoft
2317 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Microsoft
1353 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 5 problems
Interviewed by Microsoft
1985 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Microsoft
632 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 4 problems
Interviewed by Amazon
6389 views
3 comments
0 upvotes