# Microsoft Interview Experience 2019 (Internship)

**Round 1:**

The first round was an online Coding/Programming test conducted on mettl.com/. Many students across the country participated in this round. There were 3 questions of varying difficulty levels. Candidates who solved 3 problems or 2 problems with 3rd one partially solved were directly called for the onsite Interview. Few Questions were based on simple array manipulation and String manipulation and other on Dynamic Programming.

**Round 2:**

My interview was scheduled on 23rd February at Chandigarh University. People from different parts of the Country were called for the interview. The Second round was completely based on Data Structures and Algorithms. It was a pen paper-based coding test. We were given 2 questions on linked lists and Arrays, Questions were

1. Find the Maximum Sum of a linked list of length k

Eg. i/p: 1->2->3->4->5->6 k=5

o/p: 20

2.Rotate an array by k positions inplace

Eg. i/p [1, 2, 3, 4, 5] k=2

o/p [4, 5, 1, 2, 3]

Candidates were asked to give an efficient solution to these problems. For both the problems, The Expected time complexity was O(n) and constant space complexity. I solved the 1st problem efficiently with linear time complexity and the 2nd problem with time complexity of O(n^2). Out of the 45 candidates who sat for this round 6 were selected for the next round. Fortunately, I was one of them

**Round 3:**

This was an interview round which was totally based on Data Structure and Algorithms. The interviewer gave me 3 questions and I was asked to provide an efficient solution to these problems. Some of the questions were:

1.Level Order traversal of a Binary Tree

2.Rotate a matrix by 90 degree

3. Merge k sorted linked lists of length k

The interviewer was very friendly, he was trying to give me hints for the problem where I was stuck. I was stuck in the matrix question, he gave me a few hints and I was able to solve the problem successfully and efficiently. I was able to provide efficient solutions for all the 3 questions as per the expectation of Interviewer. Out of the 6 candidates who were selected for this interview only 2 were selected for the next round. Luckily, I was one of them

**Round 4:**

This also was an interview round which was totally based on Data Structures and Algorithms and your problem-solving skills. This was quite an advanced round as compared to the 3rd round. The interviewer gave me 2 questions and I was asked to provide an efficient solution for the problems. Some of the questions were:

1. Find the majority element in an array

2. Given a linked list of digits, you need to add a digit to the linked list

Eg. i/p 9->9->9 digit=1

o/p 1->0->0->0

Expected Time and Space Complexity for the 1st problem was O(n) and O(1) respectively.

The 2nd problem looks trivial and easy, but the constraints to be satisfied while solving the problem were quit interesting. Constraints were:

1. You need to solve the problem without reversing the LinkedList

2. You need to solve the problem without using stack and without using recursion.

3. You need to solve the problem with constant space complexity and time complexity of O(n).

I was able to solve the 1st question but was unable to come up with a solution for a 2nd problem that should satisfy the given Constraints. So, I was not selected for the internship.

As it was an internship Interview I was not asked questions on System Design. But be prepared for System Design questions When applying for a SDE role in Microsoft.

Tips:- Know yourself before any interview.

Be calm & answer politely.

All thanks to GeeksForGeeks

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer **Complete Interview Preparation Course****. **In case you are prepared, test your skills using **TCS**, **Wipro**, **Amazon**. **Google** and **Microsoft** Test Serieses.