'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'

Problem of the day

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

SDE - 1

Microsoft

4 rounds | 9 Coding
problems

Interview preparation journey

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

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

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

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.

2. Fourth Largest Number In Array

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.

3. Compress the String

Problem approach

- I simply use string traversal and hashing to solve this problem.

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

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

2. Palindromic Substrings

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

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

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.

2. Sum Tree

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.

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

SDE - 1

4 rounds | 6 problems

Interviewed by Microsoft

2809 views

0 comments

0 upvotes

SDE - 1

4 rounds | 5 problems

Interviewed by Microsoft

43445 views

5 comments

0 upvotes

SDE - 1

4 rounds | 8 problems

Interviewed by Microsoft

4976 views

5 comments

0 upvotes

SDE - 1

3 rounds | 5 problems

Interviewed by Microsoft

580 views

0 comments

0 upvotes

Companies with similar interview experiences

SDE - 1

5 rounds | 12 problems

Interviewed by Amazon

93445 views

24 comments

0 upvotes

SDE - 1

3 rounds | 7 problems

Interviewed by Amazon

27259 views

6 comments

0 upvotes

SDE - 1

3 rounds | 11 problems

Interviewed by Amazon

19172 views

3 comments

0 upvotes