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

Intern

Microsoft
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Prepare well for core subjects, DSA indepth
Tip 2 : Know about latest tech used for designing system
Tip 3 : Prepare and practice coding from leetcode and geeksforgeeks

Application process
Where: Referral
Eligibility: None
Resume Tip
Resume tip

Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development. 
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.

Interview rounds

01
Round
Easy
Online Coding Test
Duration90 Minutes
Interview date31 Aug 2019
Coding problem2

This was the online test taken on the Mettl Platform consist of two coding questions.

1. Zig-Zag Conversion

Moderate
0/80
Asked in companies
SquadstackFreshworksAmerican Express

You are given a string ‘S’ and an integer ‘ROW’, convert the row into a zig-zag pattern with rows equal to ‘ROW’ and output it row-wise. You may refer to the example below to better understand what the zig-zag pattern means.

Example :
If ‘S’ = “beaninjacoder” and ‘ROW’ = 4

Then the zig-zag pattern is:
b         j        r
e     n   a     e
a   i     c   d
n         o

Therefore, we will print “bjrenaeaicdno”.
Problem approach

Solution:

string convert(string s, int numRows) {
vector v(numRows, "");
int i = 0;
int n = s.length();
while(i=1 && i v[k].push_back(s[i++]);
}
string temp="";
for(auto &x: v)
temp+=x;
return temp;
}

Try solving now

2. Closest Sum

Moderate
30m average time
70% success
0/80
Asked in companies
AmazonMicrosoftAcko

Given an array 'ARR'' of 'N' integers and an integer 'target', your task is to find three integers in 'ARR' such that the sum is closest to the target.

Note
In the case of two closest sums, print the smallest sum.
Try solving now
02
Round
Easy
Face to Face
Duration60 Minutes
Interview date4 Sep 2019
Coding problem2

This was the technical round taken by the SDE-1 at microsft.

1. Longest Substring Without Repeating Characters

Moderate
30m average time
65% success
0/80
Asked in companies
AdobeInformaticaIntuit

Given a string input of length n, find the length of the longest substring without repeating characters i.e return a substring that does not have any repeating characters.

Substring is the continuous sub-part of the string formed by removing zero or more characters from both ends.

Problem approach

class Solution {
public:
int lengthOfLongestSubstring(string s) {
vector lastocc(128, -1);
int maxLen = 0, start = -1;
int l = s.length();
for (int i = 0; i != l; i++) {
if (lastocc[s[i]] > start)
start = lastocc[s[i]];
lastocc[s[i]] = i;
if ((i-start) > maxLen) 
maxLen = i-start;
}
return maxLen;
}
};

Try solving now

2. Range Sum Query - Mutable

Hard
10m average time
90% success
0/120
Asked in companies
MicrosoftalibabaNutanix

You are given an array ‘ARR’. You are supposed to process two types of queries - Update an index ‘IND’ with value ‘VAL’ in the array, and find the sum of a range in the array.

You are supposed to implement the class which includes two operations:

1. UPDATE_INDEX(IND, VAL) - It updates the value of ARR[IND] to VAL.
2. SUM\_OF\_RANGE(l, r) - It returns the sum of the subarray ARR[l] to ARR[r] i.e. ARR[l] + ARR[l+1] + ARR[l+1] + ….. + ARR[r-1] + ARR[r].
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
SDE - 1
5 rounds | 15 problems
Interviewed by Microsoft
4035 views
0 comments
0 upvotes
company logo
Intern
2 rounds | 2 problems
Interviewed by Microsoft
1499 views
0 comments
0 upvotes
company logo
SDE - 2
5 rounds | 7 problems
Interviewed by Microsoft
1649 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
Intern
2 rounds | 2 problems
Interviewed by Adobe
1019 views
0 comments
0 upvotes
company logo
Intern
3 rounds | 4 problems
Interviewed by Oracle
1298 views
0 comments
0 upvotes
company logo
Intern
2 rounds | 3 problems
Interviewed by Amazon
1163 views
1 comments
0 upvotes