'Coding has over 700 languages', '67% of programming jobs aren’t in the technology industry', 'Coding is behind almost everything that is powered by electricity'
Microsoft interview experience Real time questions & tips from candidates to crack your interview
SDE - 1
Microsoft
upvote
share-icon
4 rounds | 8 Coding problems
Interview preparation journey
expand-icon
Preparation
Duration: 4 months
Topics: C++, Data Structures, Dynamic Programming, Algorithms, Operating Systems, Object Oriented Programming, Database Management System
Tip
Tip

Tip 1: Having a grip over Data Structures and Algorithms is very important. Have your concepts crystal clear, and then pick one coding platform and try to practice around 7-10 questions every day with varying difficulty and different topics. 
Tip 2: After writing code for a particular question, try to analyze its time and space complexity. Think about how you can optimize your code further. Also, refer to the editorials and compare your solution with it. Interviewers ask a lot about further code optimization. Hence, instead of trying to solve more and more problems, try to analyze a question completely and understand the concept behind it. 
Tip 3: Along with coding, study about OOPS. Coding Ninja's Data Structures and Algorithms course helped a lot in preparing the OOPS concepts. Also, OS and DBMS must also be studied. You can refer to CodeStudio for these topics.
Tip 4: Keep participating in coding contests. It helps you increase your speed. 

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

Tip 1 : Do not fake any skills, projects or achievements. The interviewer gets to know about it by asking questions to you.
Tip 2 : You do need to have a long list of projects. Any 1 good project with proper knowledge of it will also do good. Similarly, you do need to have many skills to be listed down. Few skills but with proper knowledge is great.
Tip 3 : Try to write achievements which proves your technical skills, communication skills, leadership quality or teamwork.

Interview rounds
01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date6 Aug 2020
Coding problem3

This round consists of 3 coding questions with a total time limit of 90 minutes. The first two questions were of easy level and the third question was of medium level. No two candidates had the same set of questions, the distribution of questions was random. The test was conducted on mettl platform with both audio and video on for monitoring on the candidate.

1. Running median
Hard
46m average time
50% success
0/120
Asked in companies
SprinklrMyntraHike

You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.

Problem approach

Since the array was unsorted, fist sort the array.
Return the middle element of the array if n is odd else return the average of middle two elements.

Try solving now
2. Fruits and Baskets
Easy
10m average time
90% success
0/40
Asked in companies
MicrosoftVymoMAQ Software

There are ‘n’ fruit trees that are planted along a road. The trees are numbered from 0 to n-1. The type of fruit each tree bears is represented by an integer from 1 to 'n'.


...
View more
Problem approach

1. Add all the number of fruits.
2. Divided the total number of fruits with number of baskets, lets say this x.
3. Subtract x from all the initial number of fruits from each basket.
4. Add all the numbers and that is the final answer.

Try solving now
3. Dice Throws
Hard
35m average time
65% success
0/120
Asked in companies
MakeMyTripDisney + HotstarCognizant

You are given D dice, each having F faces numbered 1 to F, both inclusive. The task is to find the possible number of ways to roll the dice together such that the sum of face-up numbe...

View more
Problem approach

First I thought of the Naive approach which is to find all the possible combinations of values from n dice and keep on counting the results that sum to X. But since it consisted of some overlapping subproblems, I came to the conclusion that it can be solved by DP as well. Create a 2D array with the number of throws as row index and the sum as column index. Return the last element of 2D array.

View more
Try solving now
02
Round
Medium
Video Call
Duration50 miutes
Interview date10 Dec 2020
Coding problem2

This was my first interview and I was a bit nervous. The interview was conducted on Microsoft Team. He told me to share my screen and write the pseudo code on notepad. The interviewer was very friendly and also gave me hints for the question. However, he mostly focused on optimization of the code. At the end of the question, few questions related to Operating Systems were asked.

1. Group Anagrams
Moderate
30m average time
70% success
0/80
Asked in companies
CiscoDBS BankSalesforce

You have been given an array/list of strings 'inputStr'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one an...

View more
Problem approach

I applied Sliding Window technique to it.
The time complexity was O(N).
1. Store the frequency of characters in string p in a vector.
2. Run a sliding window as follows:
If the current count of the new character s[r] in the window is less than that in p, increment count.
If the length of the window equals p, compare count with p.length(). If they are same, add l to the result.

View more
Try solving now
2. Operating System

1. When does deadlock occur?(Learn)
2. What is the difference between process and threads?(

View more
Problem approach

Tip 1 : Always give a structured answer. For example, first tell the definition and then quotes a few examples in support of it.
Tip 2 : Do refer to CodeStudio for OS. Try to read as many articles as you can.

03
Round
Medium
Video Call
Duration45 minutes
Interview date10 Dec 2020
Coding problem2

The second round consisted questions related to concepts of object oriented programming and databases. At the end of the interview he asked me to explain any one good project. The interview lasted for 45 minutes. The interviewer was friendly and good.

1. OOPS Questions

1.What is the difference between static polymorphism and runtime polymorphism?(Learn)
2. What is a copy constructor? Tell any one use of it.(

View more
Problem approach

Tip 1 : Always think properly before saying your answer. Try to communicate clearly.
Tip 2 : Coding Ninja's Data structures and algorithms in C++ course helped me a lot in clearing my OOPS concepts.
Tip 3 : Along with definitions, try to give examples also.

2. Merge Sort
Easy
15m average time
85% success
0/40
Asked in companies
HCL TechnologiesAtlassianCognizant

Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.

Example :

View more
Problem approach

1. You should know properly about what is merge sort.
2. The pseudo code is as follows:
MergeSort(arr, left, right):
if left > right
return
mid = (left+right)/2
mergeSort(arr, left, mid)
mergeSort(arr, mid+1, right)
merge(arr, left, mid, right)
end

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date10 Aug 2020
Coding problem1

This was my last round and I was a bit tensed. It was an HR round. The interviewer was very professional. He discussed and asked questions about my various achievements, my interests apart from the technical field and also asked about my projects. I made sure to answer all the questions confidently and calmly.

1. General Questions

1. Tell me about yourself.

2. Which is your favorite project? Elaborate that project.

3.  Asked a question related to one of my achievements.

4. What role do you want in Microsoft?

5. Is there any technology that interests you and you would like to work upon?

Problem approach

Tip 1 : While answering to the question "tell me about yourself" , you can mention your technical skills and how you developed interest in coding. Apart from technical side, you can also tell your other areas of interest and hobbies.
Tip 2 : You should be clear about all the projects, the technologies used in it, why you used them specifically, the purpose of the project, etc. 
Tip 3...

View more
Start a Discussion
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
4921 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Microsoft
489 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by Microsoft
486 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 2 problems
Interviewed by Microsoft
3781 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
93000 views
24 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
27136 views
6 comments
0 upvotes
company logo
SDE - 1
3 rounds | 11 problems
Interviewed by Amazon
19122 views
3 comments
0 upvotes