'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 | 9 Coding problems
Interview preparation journey
expand-icon
Application story
<p>For any off campus application, I'd suggest getting a referral first before applying.</p>
Preparation
Duration: 4 months
Topics: Data Structures - Arrays, Strings, Linked List, Trees, Binary Search Tree, Graph, Tries, Fenwick Trees, Segment Trees, Hashmap. Algorithms - Recursion, Ad Hoc, Dynamic Programming, Greedy, Binary Search, Breadth-first search, Depth-first search, Sorting .
Tip
Tip

Just be confident during interview and if you are stuck in between any question, then ask for a hint from the interviewer. The practice is key for success, so practice hard for Data Structures and Algorithms coding problems on Coding ninjas as it is the best platform for coding. Also you may practice on Geeks For Geeks or any other interview portal. 

Application process
Where: Campus
Eligibility: 7 CGPA
Resume Tip
Resume tip

Mention all internships which you have done, as it increases your chances of shortlisting your resume. Also just write that skills which you are pretty confident about.

Interview rounds
01
Round
Easy
Online Coding Test
Duration90 minutes
Interview date28 Nov 2019
Coding problem3

This round was the online coding test conducted on the platform Mettl. The languages allowed were C, C++, Java and Python. There were three questions. One was of graphs (Depth-first search), other was a big integer problem and the third was a string problem.

1. Colour the Graph
Moderate
20m average time
80% success
0/80
Asked in companies
Hexaware TechnologiesArcesiumShareChat

You are given a graph with N vertices numbered from 1 to N and M edges. You have to colour this graph in two different colours, say Blue and Red such that no two vertices connected by an edge is of same colour.

Problem approach
  • I use recursion to solve this problem, and assigned color to each node and check at last whether it is giving safe configuration or not that is all nodes are of red and blue color and adjacent nodes have not the same color.
Try solving now
2. Fourth Largest Number In Array
Easy
20m average time
0/40
Asked in companies
CiscoBank Of AmericaMicrosoft

You are given an array consisting of 'N' integers. You have to find the fourth largest element present in the array.

Problem approach
  • I take both numbers in strings and use school mathematics concept of sum and carry to solve this problem, also my friend solved this question in python without using string concept.
Try solving now
3. Compress the String
Moderate
32m average time
60% success
0/80
Asked in companies
AmazonCognizantMicrosoft

Write a program to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions.

For e.g. if a String has 'x' repeated 5 times, replace this "xxxxx" with "x5".

Problem approach
  • I simply use string traversal and hashing to solve this problem.
Try solving now
02
Round
Easy
Coding Test - Pen and paper
Duration60 minutes
Interview date28 Nov 2019
Coding problem2

This was a pen and paper subjective interview round. You were expected to write full code on paper. Make sure you use proper names for the variables and write comments explaining very clearly what the code does. Also, try writing code in good handwriting which can be understood by the interviewer.

1. Product of Array except self
Easy
26m average time
0/40
Asked in companies
FacebookDelhiveryIntuit

Given an array. Replace all the elements of the array with the product of all numbers except the number at that position. Do not use the division operator.

Problem approach
  • Create two arrays called left and right. In the left store the product of all the numbers before the number at the current index. In the right store the product of all numbers after the number at the current index. And then just multiply left and right for each index. The interviewer was satisfied with this approach and asked me about the complexity of code and I tell him properly.
View more
Try solving now
2. Palindromic Substrings
Moderate
20m average time
80% success
0/80
Asked in companies
SalesforceMicrosoftInfosys

Find the total number of palindromic substrings in a given string.

Problem approach
  • There can be odd palindromic substrings and even palindromic substrings. So for odd palindromic substrings, consider each letter in the string as the center and then expand the substring in left and right and check. For even, take two adjacent characters and expand the string left and right and check if there's a possibility of forming a palindrome. This was the most efficient solution to ...
View more
Try solving now
03
Round
Easy
Face to Face
Duration45 minutes
Interview date1 Dec 2019
Coding problem2

The interview took place in the morning and the interviewer was very friendly.

1. Count Inversions
Moderate
40m average time
55% success
0/80
Asked in companies
OracleMorgan StanleyArcesium

Let A[0 ... n-1] be an array of n distinct positive integers. If i < j and A[i] > A[j] then the pair (i, j) is called an inversion of A (where i and j are indexes of A). Given an integer array A, your task is to find the number of inversions in A.

Problem approach
  • Firstly I gave him a brute force approach, then he asked me to give an optimal solution so I gave him an enhanced merge-sort solution.
Try solving now
2. Sum Tree
Moderate
29m average time
0/80
Asked in companies
MicrosoftOYOAmazon

Given a binary tree, convert it to its sum tree. That is, replace every node data with sum of its immediate children, keeping leaf nodes 0. And then return its preorder.

Problem approach

I use tree traversal to solve this question with recursion. Do a traversal of the given tree. In the traversal, replace the value of the current node, with the sum of the values of left and right node (if they exist). Recursively follow for left and right node. And in the end, return the preorder of tree. He was satisfied with the approach.              

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date1 Dec 2019
Coding problem2

The HR Interview round was held in the morning and it was right after my technical interview.

1. Introduce yourself and why are you intrested in Computer science?
Problem approach
  • I introduced myself, my name, branch, the reason why I was interested in computer science and Microsoft.

 

2. Why would you be a good fit for Microsoft?
Problem approach
  • The reason why I believed I was a good fit for the company was that I understood that Microsoft has been around for a very long time and despite that, it is still one of the top companies. For a company to stand that tall for that long, there must be something that they're doing right. I understand this factor is what makes them different from the rest and that's why I'd be a great fit for...
View more
Start a Discussion
Similar interview experiences
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by Microsoft
2809 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
43445 views
5 comments
0 upvotes
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Microsoft
4976 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Microsoft
580 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
93445 views
24 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
27259 views
6 comments
0 upvotes
company logo
SDE - 1
3 rounds | 11 problems
Interviewed by Amazon
19172 views
3 comments
0 upvotes