Microsoft

# Microsoft Interview Questions and Tips

Showing 1 - 10 of 72 interviews

1

## Microsoft Sde (software development engineer) interview

41.6k views
Richa NigamFresherSelected
Application
I was interviewed on-campus at NIT Bhopal for Sde (software development engineer) role at Microsoft
Interview Process
Test Test Test Technical Interview Technical Interview Other Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
15 questions
Test Sections
• Section 1: Technical Aptitude
Interview Experience
The MCQs were based on C.C++,Java and some Operating System questions. Around 200+ from our college sat for this round.
Interview Tips
Solve C C++ output related questions.
Difficulty level : Medium
Round 2

### Test

Duration
90 Minutes
No. of Questions
2 questions
Test Sections
• Section 1: Online Coding Round
Interview Experience
After the first round around 100 (consisting of the internship students as well) students were shortlisted for the second round
Everyone got different sets of questions. The questions I got were :
Given two arrays were digits of one array represent a number,maximize the number by replacing it with elements of second array.
eg:
arr={3,1,4,5,6}
rep={1,9,5,2,3}

after replacement
arr={9,5,4,5,6}
one digit of rep can be used to replace only once.
For this almost everyone who got this question used a brute force method.But I had used a different approach .I constructed a max heap of rep array.And ran a loop checking if the max element of rep was greater than the element in arr and then replaced it in arr and deleted the same from the maxheap.

Given a matrix ,where each cell represents a value of strength.The value could be positive negative or zero. At each cell the strength value is added.You have to reach from point (0,0) to point (m-1,n-1) if at any point the strength becomes zero or negative then you cant proceed further.Find the minimum strength required before starting to reach the end of the matrix.
eg . {{ 1,-3,0},
{-2,1,-1}} Ans: 2 ( (2+1+(-2)+1+(-1)=1 path taken )
I gave a DP solution but was unable to pass a few test cases in this question.
Interview Tips
Practice problems on Data Structures like Trees, Arrays , Heaps , Linked Lists ,etc
Round 3

### Test

Test Sections
• Section 1: Written Coding Round
Interview Experience
Around 30 students consisting of students from other colleges as well were called On-site. This was a written round.Everyone was given around 45 mins and 1 question.
Given the root to a binary tree, a value n and k.Find the sum of nodes at distance k from node with value n.
This is similar to this question on geeks ->http://www.geeksforgeeks.org/print-nodes-distance-k-given-node-binary-tree/
I was able to do this quite quickly :D I even explained my answer to the HR and he asked me to write different types of test cases to exhaustively check if my code works on all of them.
After this round around 14 people were shortlisted.
Round 4

### Technical Interview

Interview Questions
• Question 1: Find and element in a rotated array
• Question 2: Given two linked lists both represent a number . Create a linked list that contains its sum
Interview Experience
These were fairly easy questions . I knew the solutions and explained it to the interviewer.He asked a few questions on them , seemed satisfied.Asked me if I had any questions for him . So I asked him about the different technologies that a new SDE would work on and things like that. I had a pretty good discussion with him he told me many things from his end too.
I made it to the next round then :D
Interview Tips
Well one thing I realized after giving interviews was when they ask the candidate for any questions then you should always ask something , shows that you are interested.
Round 5

### Technical Interview

Interview Questions
• Question 1: You have to design a Text Editor like notepad . You are concerned about the following functionalities - insert, delete, and search.You can assume the other functionalities of the text editor like save , display of text,etc are handled by some other developer. You just have to suggest what kind of data structures you would use to carry out the concerned functionalities efficiently
Interview Experience
He told me to take my time and give the solution. I gave him a solution of considering the text as a linked list of words . Where each node in the linked list contained the word string and an index .And for every node in the linked list I will have Trie structure. I used trie for efficient search.What I suggested was that I use the trie whenever the user enters a word and insert it into the trie and the leaf of that word will contain the index of that word plus the pointer to that node in the linked list . If suppose the trie already has the word then i increase the word count in the leaf and the leaf will contain a vector that has the list of indexes where the word has occurred and the list of pointers where the word is present in the list.I wrote the code and explained how it can handle all corner cases . We discussed the the solution and he asked me certain questions on different test cases . My approach handled them well. He seemed satisfied . He added to the question that the search query could contain words or phrases . So my use of indexes could handle the phrase search :) . I also suggested that instead of Trie data structure we could use a Ternary Search Tree as that would be more space efficient.
Interview Tips
Practice Design questions too besides Data Structure problems
Round 6

### Other Interview

Interview Questions
• Question 1: he asked me about the question given to me in the previous round i.e Text Editor . I gave him a brief explanation on my approach . He then gave me another question based on Text Editor. He asked me how could I retrieve K most Frequent words from the text efficiently.
• Question 2: Given a binary search tree , print the path which has the sum equal to k and has minimum hops. i.e if there are multiple paths with the sum equal to k then print the path with minimum number of nodes.
Interview Experience
This was a HR+Technical Interview

The interviewer was quite experienced and very pleasant. He asked me how my previous rounds went.He was going through my performance review from the previous rounds. He took a glance though my CV and asked me about the projects I did. He saw that I had interned at IITB so he asked me a lot on that project. He also asked me some basic HR questions like Why should Microsoft hire you ? Where do you see yourself in the next 5 years ?.He was very impressed with my academic record and my AIEEE rank. Asked me how I handled my 12th board exams and entrances.He made it very comfortable and was almost chatting and getting to know about me.
Question 1:
Thankfully I was just going through this question just before this round :D . I suggested the solution using Trie and Min Heap.
Similar to -> http://www.geeksforgeeks.org/find-the-k-most-frequent-words-from-a-file/
Question 2 :
First I gave him the brute force approach . Similar to ->http://www.geeksforgeeks.org/root-to-leaf-path-sum-equal-to-a-given-number/
But I knew it wasnt using the fact that we have a Binary Search tree . So the interviewer gave me some hints - like what is main criteria of a BST . I immediately figured out that the minimum path will always be on the right side of the node because it has the larger value. I told him the solution he seemed satisfied.
He then asked if I has any questions for him . So I asked him about where I can improve myself , he said I didnt need any improvement I am doing very well and that I should jus keep doing what I am doing :D That certainly made my day :) I asked a couple more questions about Microsoft and then left.

Finally after a week the results came I received the mail that I had been shortlisted for a Full Time Position :D
Interview Tips
Have a good grasp on Data Structures. Solve as many problems possible from Geeks4Geeks
Be confident in the interview . Have a smiling face and be adaptable to the question . The interviewer can anytime change or twist the question just to confuse you.
The interviewers are very helpful , if you feel stuck communicate with them ..explain your approach they will give you hints.
When the interviewer gives the question listen to it carefully do not immediately rush to writing the code .. ask him about the different criteria and restrictions pertaining to the question.
Check your code with all possible test cases and list them.
Lastly , even if you arent able to get the right solution then just explain your approach . Recruiters analyse how you tackle the problem not necessary that you have to have the accurate solution.
Resources

### Preparation materials

Books
• R S AGGARWAL For Aptitude,
• Cracking The Coding Interview : Gayle Laakmann McDowell,
• Data Structures Through C In Depth,
• Data Structures And Algorithms Made Easy : Narasimha Karumanchi,
• E. Balagurusamy,
General Tips
Be confident in the interview . Have a smiling face and be adaptable to the question . The interviewer can anytime change or twist the question just to confuse you.

The interviewers are very helpful , if you feel stuck communicate with them ..explain your approach they will give you hints.

When the interviewer gives the question listen to it carefully do not immediately rush to writing the code .. ask him about the different criteria and restrictions pertaining to the question.

Lastly , hard work goes a long way ! Never loose hope. I got placed in Oracle Applications and Microsoft after being rejected by almost 6 companies :) And believe me those interviews also taught me a lot .

Learn from your failures and don't lose hope :)
Motivation for applying
Microsoft is dream company for any Computer Science Engineer. And I am glad I got this opportunity.
2

## Microsoft interview

30.9k views
AnonymousFresherSelected
Application
I was interviewed on-campus for Microsoft
Interview Process
Test Group Activity Technical Interview Technical Interview HR Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
3 questions
Test Sections
• Section 1: 1. The input is a binary search tree (BST) and an integer N. We define a node in the BST whose value is less than N and closest to N as predecessor of N. Find the predecessor of N in the BST if it exists by writing a C-code. Return the pointer to the node which is predecessor to N if it exists, or return NULL if it doesn’t exist. The code should not contain any global or static data. (i.e. re-entrant data). struct node{ int val; struct node* left; struct node* right; }; node* findPredecessor(node*root, int N);
• Section 2: Find whether a singly-linked list (L2) is sublist of another singly-linked list (L1). If the L2 is indeed sublist of L1, then return the pointer pointing to the 1st element of the sublist in L1. e.g. L1 = 10-20-50; L2 = 10-50; Return the pointer to the value 10 of L1.
• Section 3: Let E be a set such that it contains 1. Also there is another input N. Generate all the values less than N, using the generator function: 2x+5y where (x==y) is allowed.
Interview Experience
There were 3 questions. In all of them we were asked to write the code. As mentioned above
Round 2

### Group Activity

Interview Experience
After this round, 27 (From 112) were shortlisted. This second round was called “Group Activity”. The idea in this round was to solve problems in consultation with the Microsoft recruiters. Think of some idea and discuss it with the person allotted to u and then code the algorithm. This was the rule of the game. So people who preferred to solve the problems individually got thrown out in this round. In this round the following problems were thrown to us.

1. There are 3 (non-decreasing) sorted arrays, namely A, B and C. Define a triplet (a, b, c) such that a is in A, b is in B and c is in C. Also, define

dist (a, b, c) = max (|a-b|, |b-c|, |c-a|)

Now find the triplet (a_min, b_min, c_min) from A, B and C such that dist (a_min, b_min, c_min) is minimum among all possible triplets.

Hint: Brute force method: Compute all possible triplets and return the triplet with the min dist value. Smarter Approach: Use 3 pointers. Allot single pointer for single array. Initialize each one of them with the first positions of each of the array. Now compute the dist of the triplet formed by the values pointed by the pointers. Update the bestTriplet if the cost is less than bestTriplet. Next increment the pointer which points to the minimum value among the three. The philosophy is similar to the merge-sort. Only difference is that, actual merging is avoided since merged array does not guarantee three consecutive elements to be from three different arrays A, B and C. The proposed algorithm takes O(n(A)+n(B)+n(C)).2. There is a circular array which is a queue (FIFO). Several threads are trying to either insert or delete elements from the queue. Write code for insert, delete, IsFull, IsEmpty such that the functions are synchronized enabling parallel insertion and deletion.

Hint: It is simple. This problem requires smart use of semaphores
Round 3

### Technical Interview

Interview Experience
Round 3 (Tech Interview): Library HallIn this round I met a guy who was the most geeky kind of person. He didn’t even smile at PJs probably. His first question was to describe my project in summer training. The guy had no knowledge in VLSI and related stuffs. So I started the first class lecture of my CAD for VLSI course by Prof. PPC. I described him the basic steps of VLSI design starting from the High-level design to the fabrication. He had many doubts and it seemed that he was impressed with my explanations.

The next question was as follows:

Consider the skyline of a city shown in the picture below. You are given with the (xi, hi, wi) for n buildings. You have to give the silhouette of the city.I proposed one O(n2) algorithm by proposing a construction a graph where each building represents a vertex and there is an edge between two vertices if they are overlapping. For example ith and jth building has an edge between them then either,

xi <= xj <= xi + wi or xj <= xi <= xj + wj

However, he suggested me to optimize the data-structures. Then finally stored the data in a heap and seemed that he was happy. Lastly he said, “I was not interested in the answer actually. It was nice talking to you.”
Round 4

### Technical Interview

Interview Experience
Round 4 (Tech Interview):

In this round, I met a bashful person who asked me the following.

1. Code the move of a game which was pretty simple in nature. I am not describing it here. But the tips (courtesy: Chandu and Dhawan who generously contributed towards the Q&A library building during the placement of 2004 batch) that I applied here was, a) code to the detail, b) check the boundary condition c) explain each line to the recruiter, d) ask the recruiter whenever u have any doubt or before making any assumptions and e) definitely think aloud.

2. There is an array where except one number (say magic-number) all are unique. The magic-number repeats itself more than half times the size of the array. e.g. 2, 10, 10, 10, 3. Find the magic-number without using any extra-space and without sorting it.

Hint: Use the given property, “magic-number repeats itself more than half times the size of the array”. This ensures (from Pigeon Hole Principle), that there exists at least one triplet (triplet here stands for 3 consecutive elements in the array) which has the magic-number more than once. So scan the array once and search for the magic-number.3. Gave a simple ‘strcat’ code and asked for the errors in it. The errors were the following:

a) there was no ‘’ in the end.

b) returning a pointer to a character array which is locally declared in the function.

4. Asked the difference between C++ and Java.
Round 5

### HR Interview

Interview Experience

there any question for me?”

So this was my experience in Microsoft interview. I liked the problems they asked me. The suggestions for an aspirant would be following.

1. Come prepared with fundamental data-structures and algorithms.

2. Industry people find the “code” nearer to their heart but feel uncomfortable with “graphs”. They are real expert in the code, but theoretical abstractions are grey areas for them. This is my own realization and I may be absolutely wrong.

3. Interact, interact and interact with the recruiters during the interview. Think aloud. It helps. They are not interested in getting a correct solution but they are more interested in the effort u r putting in and moreover the line of thought that you are having. Above all, remain confident even if u do not know anything about the answer.

4. The interview might span over 7-8 hours at a stretch. So keep biscuits with you since in empty stomach u cannot think smart.
Interview Tips
Tips :Interviews can be a jittery experience. And even if we are seasoned and confident, there are bound to be some butterflies in our stomachs right before the first interview. Once the process starts however, its usually calm, and the ball keeps rolling.Someone with a good grasp of the fundamentals of data structures and algorithms specially trees, linked lists and elementary graph algorithms has a good chance when it comes to clearing a MS interview. Also a lot of questions were typical interview problems that can be found in most books and also around on the internet. If you want a job at Microsoft then prepare well for your interview. Let me know in comments if you found this post useful.
Motivation for applying
Microsoft was the first company I was shortlisted and reached the interview round clearing the first level test. I could remember all this as i jotted them down in from of a note back then when FB was just an infant The experience was rewarding in many sense. This is my first interview experience and I am thankful to all my batch-mates and seniors whose valuable suggestions helped me in emerging successful in this interview. Here I present my experience.[P.S I won't mention about PPt that took place in CAT hall casue you all know what Microsoft is ]''
3

## Microsoft Software development engineer interview

30.1k views
AnonymousFresherSelected
Application
I was interviewed on-campus for Software development engineer role at Microsoft
Interview Process
Test programming round case study round Technical Interview HR Interview
Round 1

### Test

No. of Questions
30 MCQs questions
Test Sections
• Section 1: C programming language (20-25 MCQs):
• Section 2: Data Structures and Algorithms, OS and DBMS (5-10 MCQs):
Interview Experience
Some companies don’t make any strict regulations regarding the language in question, but Microsoft always goes with C/C++. The questions are similar to what you would find in books like “Let us C”. Questions regarding pointer manipulation, predicting the output, pre-order postorder increment decrement, structures, arrays formed the majority. · These are their favourite areas of computer science that they choose to focus on. That being said the questions asked in this section were quite few. Maybe 5 or less than that. Questions regarding like memory allocation in OS, preferred data structure for a particular application, properties of database management systems made it in.
Interview Tips
1.   While preparing for the aptitude, sharpen your C skills. Give second preference to OS, DBMS and DSA. 2.   Get extensive practice in the most common types of C aptitude questions and give regular online tests. 3.   Cover what you can in OS, DBMS and DSA in the time that remains.
Round 2

### programming round

Interview Experience
Once you clear the aptitude you become eligible for the programming round. This round has two questions meant to be solved in C. The focus is on the following aspects and in this particular order:CorrectnessOutput is correct for the given test cases Completeness Output is correct for all the test cases Time Complexity The program has the specified time complexity or less Space Complexity The program does not occupy too much excess space
You don’t have to write the entire programs just the necessary functions to perform the tasks given. The results were declared after a few days when Microsoft visited.
Question1 - Find an element in a rotated sorted array in O(log n) time. For ex. Find 4 in 7 8 9 1 2 4 5
Question2 - With a parent pointer in every node of a binary tree, find the in order successor of a given node. I solved both of these questions, yet my solution for the first one used some amortized amount of time (amortized time is time that is not significant enough to affect the order, that is log n, but it is not too insignificant to be ignored as constant) more than the required time constraint which had me worried a little
Interview Tips
Work on getting at least the right answer, worry about the run time and space complexity later. Even people who could get just the right answer made it to the wildcard round
Round 3

### case study round

Interview Experience
People who barely managed to get their output right in the last round were eligible for this round. I don’t have details about how this round was conducted since I wasn’t part of it but it is pretty standard procedure, the same kind of GD or case study that happens in most companies
Round 4

### Technical Interview

Interview Questions
• Question 1: : While I read the resume go ahead and introduce yourself.
• Question 2: : Questions about DSA and DBMS
• Question 3: Write code for the subtitle syncing application you talked about, not the entire thing, just the crux of it.
• Question 4: Write code for designing the ADT (Abstract Data Type) for all the classes that might be required to represent the game of chess
Interview Experience
Round 5

### HR Interview

Interview Questions
• Question 1: Why Microsoft?
• Question 2: You left Barclays for Microsoft?
• Question 3: What makes you better than you colleagues?
• Question 4: Write the artificial intelligence logic in code for your Chess representation
Interview Experience
Why Microsoft?- Give some answer that is well thought and prepared beforehand.
You left Barclays for Microsoft? -Basically what they wanted to know here is that I don’t have the same plans for Microsoft. I told them Barclays was an investment bank and while I was fortunate to get a chance to work in that great environment I want to start my career in a product based company so Microsoft (Microsoft is becoming a service based company now BTW) Note: If you have done internship somewhere else and have rejected an offer from there, say only good things about your previous employer. Anything else will reflect badly on you.
What makes you better than you colleagues? - Whatever nice things you can say about yourself, everything comes here. Don’t, however mention the negative points of your colleagues, in hopes of making yourself look good. It will only make you look bad.
Write the artificial intelligence logic in code for your Chess representation- Now the fact that this question was asked in HR rather than Tech should give you an idea about the real purpose of this question. When this question was asked we didn’t even have AI as a subject yet. The interviewer knew beforehand that I could not code this. He wanted to see how I would handle it. So after thinking for a few minutes I decided to draw flow charts and map out scenarios
4

## Microsoft Software development engineer interview

29.5k views
Shouvik RoyFresherSelected
Application
I was interviewed on-campus at NIT Durgapur for Software development engineer role at Microsoft
Interview Process
Test Test Technical Interview Technical Interview Behavioural Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
15 questions
Test Sections
• Section 1: General Aptitude + C/C++ Output
Interview Experience
Easy questions on aptitude and output for C/C++.
Interview Tips
Try out questions from GeeksQuiz or http://www.indiabix.com/
Round 2

### Test

Duration
60 Minutes
No. of Questions
2 questions
Test Sections
• Section 1: Coding Round
Interview Experience
Questions were easy and implementable within the time given. One was on linked list and the other on array/bit-wise arithmetic.
Interview Tips
2-3 Days of GeeksforGeeks would give you an edge in this round. Make sure you document your code with proper comments and write mnemonic variable names. Also if time permits write the logic or algorithm you've used in comments.
Round 3

### Technical Interview

Interview Questions
• Question 1: Questions based on resume
• Question 2: Questions on Java/JVM and OOP
• Question 3: Question on How to manage yourself and work in a team and your past experiences
Interview Experience
The overall experience was wonderful. It was my first interview and i was able to answer most of them. On the behavioral questions your opinion should be clear and you should be able to convince the interviewer properly.
Interview Tips
Just be yourself, try to bring topics on which you've worked on earlier into the discussion so that the interviewer takes more time to analyze what you've accomplished. Don't hurry, if you don't know any answer, politely say you don't know it, but you would like to take a try.
Round 4

### Technical Interview

Interview Questions
• Question 1: Questions on hobbies
• Question 2: Questions on my favorite topics in CSE
• Question 3: Questions on resume + projects + internship
• Question 4: Questions on Data Structures/ Algorithms
• Question 5: Questions on Problem designing
• Question 6: Questions on C/C++ skills
• Question 7: Pen/Paper coding
Interview Experience
My interview lasted for 1 hr 15 mins and I started well with my Introduction and hobbies. It was behavioral initially. Be open  and honest  to your interviewer. Don't speak random stuffs you haven't done as your interviewer can instantly browse on the internet about what you are saying and verify them. Have a good understanding of DS/Algo and know at least one OOP. you should at least master one language, its not a huge bonus if you know a lot of them.
Interview Tips
Be clear about what you say and write and instantly correct yourself if you've made a mistake. It shows that you are self-critical and you constantly improve yourself. It is good to accept any mistake you've done. Any code you write on paper should properly highlight your logic used. Its better to write a wrong code and debug/modify it on spot to make it correct rather than writing a code with zero error at first shot. It shows how you learn from your mistakes.
The interviewer wants to see how you adapt yourself and learn, he/she is not interested in how much you know.
Round 5

### Behavioural Interview

Interview Questions
• Question 1: Questions about myself/hobbies
• Question 2: Questions on resume/internship
• Question 3: A few technical questions
Interview Experience
This round was the final round for Microsoft Internship. It was an AA( As Appropriate ) Round, where you can expect technical as well as HR questions.
Interview Tips
Feel confident about yourself and the game plan is again just to be yourself. Do some Research on the company you are sitting for and about their products/services, so that you can show that you are as much interested in joining the company as they want to take you in after clearing all these rounds. Always ask your interviewer some relevant questions, whichever round it may be. This is where you can ask about the company's policies, culture etc.
Skills

### Skills Tested

Skill Tips
Just give your best if you are willing for the company and never underestimate your abilities. Have some internships/projects/apps on your resume which you've made. Mention all the relevant work you've done, just don't brag about it. Prepare well for the behavioral questions. Be prepared to admit your mistakes and accept others' solutions.
Resources

### Preparation materials

Books
• Cracking the Coding Interview,
General Tips
Keep yourself motivated and build your resume. Have good working knowledge and make your fundamental concepts clear. Try to work on projects/internship or summer/winter training courses.
Motivation for applying
Microsoft was founded by Bill Gates and Paul Allen with an objective of "A Computer in every Home", since then Microsoft has carried on its effort and changed the way we do things and interact with others. It has achieved more than its primary objective and its one of the leading software companies in the world. Its exciting to be a part of it and take joy in developing solutions which affect billions of people worldwide.
5

## Microsoft Software devolopment ( and ml ) internship interview

30.6k views
Shiva Krishna MFresherSelected
Application
I was interviewed on-campus at IIT Madras for Software devolopment ( and ml ) role at Microsoft
Interview Process
Test Test Group Discussion Technical Interview Technical Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
15 questions
Test Sections
• Section 1: Online Exam hosted on cocubes.com
Interview Experience
The first round was in multiple choice format. Most of the questions were from I/O in C , C++ and Java. There were few questions on operating systems and other topics in CS. Most of them were easy and the only factor is time. You have exactly 30 mins to solve 15 MCQs.
Interview Tips
Be prepared in C , C++ and Java. If you are new to any of these languages , at least have a look at the basic input output functions.
In my class they basically selected everybody to the coding round. However it is always good to write as best as you can since they look at cumulative score at the end.
Round 2

### Test

Duration
60 Minutes
No. of Questions
2 questions
Test Sections
• Section 1: Coding : Online
Interview Experience
There was a coding round for the selected students. In my class everyone was selected to this round.There were 2 questions :

1 ) Given a Binary tree find sum of data at all the boundary nodes. A boundary node was defined , which basically evaluates to any node on the left most path , right most path and the leaves.

2) Given 2 numbers in a linked list form i.e each digit of a number in a node of the linked list , return the linked list that is the difference of the two input linked lists.
Interview Tips
Coding is only perfected by practice. Have a good understanding of Data structures and common algorithmic paradigms including DP , Divide and Conquer, greedy etc.
Round 3

### Group Discussion

Duration
60 Minutes
Group Discussion Topic
Group fly round (Not exactly a group "discussion" )
Interview Experience
Here's the deal : The group of students selected are seated in a big room. A problem statement is put up as a power point slide ,and you are expected to come up with appropriate data structures and algorithms to solve the problem. There are mentors who assist you ( if needed ). You have to explain your approach and write a (psuedo) code for your idea.

In my case the problem statement was as follows :
"Consider a game as follows : There is a 4X4 size game board. On each slot in the board a dice is placed. The dice has a character ( a ,b ,c .. ) printed on it. There is a character on every side of the dice. Now find all the words that can be made (in the wordament game style ) by the characters on the top face of the 16 dices. Now also write a shuffle function that shuffles the board.
Interview Tips
It was an easy backtracking question. If you can improve your data structure , it would fetch you extra points.
Round 4

### Technical Interview

Interview Questions
• Question 1: What is linear regression ? How do you find the estimates of the coefficient vector.
• Question 2: He drew a distribution of data points into two classes. Construct a decision tree for the distribution. Write pseudo code for the same.
• Question 3: Discussed about my past internship which was also in ML.
Interview Experience
Basically I applied for a machine learning profile. So all the technical questions were from basics of ML. If you have good basics in ML , the interview is very easy. I was doing ML this semester only. So he might have limited with basics :P
Interview Tips
Tell your mentor if you are not aware of a particular approach to ML classification( or regression) . He ll teach you the basics(literally :P ) and then ask questions.
Round 5

### Technical Interview

Interview Questions
• Question 1: Consider the Uber cabs company. There are many factors that determine the availability of the drivers and the demand of the users. Model this scenario from an ML perspective and optimize the demand and availability of drivers.
• Question 2: A simple probability question involving likelihood estimate.
• Question 3: What are the problems of over-fitting ? How do we remove it ?
Interview Experience
It is okay if you don't come up with great model. I only knew about Linear Regression and modeled it accordingly.
I took --- > Y = ( Demand/Availability) as my output variable and identified a few input parameters. He was satisfied with that :P

In the third question he elaborated a little more on Bias and variance.
Interview Tips
Basic ML is more than enough.
Resources

### Preparation materials

Books
• CLRS book ( the bible of algorithms ) ,
General Tips
Be confident. Dress properly for interviews. If you get the internship more than happy. If not : remember this " Success is going from failure to failure WITHOUT losing enthusiasm
Motivation for applying
My long term goal is to be a data scientist. So an ML profile at Microsoft was the best thing I could get now :P
6

## Microsoft Program manager interview

28.9k views
AnonymousFresherSelected
Application
I was interviewed on-campus for Program manager role at Microsoft
Interview Process
Test Problem Statement Technical Interview
Round 1

### Test

Interview Experience
1) Objective Paper - i)Basic C questions
ii) DS questions covering Graphs and Trees
iii) Analysis of Algo. Questions.
iv) There were more but I can’t remember
Round 2

### Problem Statement

Interview Experience
I attempted question Number 3 very well which was also brought up in my 3rd tech Interview. It was what got me through I assume.

Screening Test: 6-8 people in a room were taken and were given the following problem to solve -
“ There are two given sorted Linked lists. Merge them to form a single sorted Linked list. In case of duplicates, delete copies”
In one batch, people were also told to write test cases.
Interview Tips
Speed, Accuracy and Covering as many cases which may arise as possible in the code
Points where every VJTIan committed mistakes - !) In case of duplicates, only one node was inserted into the single linked list, but nobody freed up the memory of the other node by using free. they expect that.
2) modularization - In case one of the linked lists is over, we simply append the remaining elements of the other array into the single linked list. This was expected to be done by a single function taking parameters.

Why I cleared - Finished Coding around 12 mins before everybody and committed no mistakes which others made. The above two are the only things I didn’t do
Round 3

### Technical Interview

Interview Questions
• Question 1: Tell me about your projects 2) Show me how Binary search works
• Question 2: Show me how Binary search works
• Question 3: What is its complexity
• Question 4: When a sorted array is ‘Rotated’, its last element becomes the first element and the remaining elements shift to the right. Write a function which takes an input array and returns the no. of times an array has been rotated
• Question 5: ) Implement the above with logarithmic Complexity
• Question 6: Write Code for Binary Search
• Question 7: Write Test Cases for Your function and Binary Search
• Question 8: Final interview: 1) Why do you want to be a PM
• Question 9: If you are selected, what would you want to work on at Microsoft and why
• Question 10: Design the Navigation system (Forward and Back Buttons) of a Net Browser with Data Structures
• Question 11: Design a remote of 5 keys, what would you do
• Question 12: Write an API for a button
Interview Experience
No. 2 - 1) Design an Offline Browsing Experience
An one and half hour discussion was held on this, where he asked me Line of thought in designing the product, the thinking behind various proposed features, Made changes in the requirements, told to propose new features as per new requirements for at least 4 features, How will you implement the feature - show UI and block Diagram, what data structures will you use for the feature etc etc.
Was checking Designing aptitude and how many new features proposed

No 3 - 1)How will you implement an N-ary tree (N has no limit) and write code for BFS on that N-ary tree based on the implementation
Gave her Three implementations. She only settled for the one which She wanted
2) Write code foe the node of the tree and the above BFS

3) The weight of the node is given as Value of node*level of node. Write a function which returns the address of a node with the MAXWEIGHT in a binary tree
I gave Non-recursive solution. She then asked for a recursive solution
Code for both Recursive and Non-recursive she made me write

4) Given an array of n elements which have numbers in the range of 0 to n-1, find if the array has any duplicate elements

5) Write code to return position of the duplicate element
Was just checking coding knowledge
Interview Tips
1) Accuracy is not very important, approach is. If you are wrong, you should be able to tell why you are wrong before the interviewer tells you. The interviewers help a lot, but getting the correct solution is required
2) Write as tight code as possible in aptis and interviews. From freeing nodes, to returning boolean instead of Int, to Using struct instead of two separate variables, every bit of efficiency is appreciated and earns you a lot of points
3) Keenness to learn is a very important quality which they see when they are considering a PM candidate. It is hard to fake that. They usually deduce it by the way you talk.
4) For PM, they take the ‘Do you have a question for me’ very very seriously. Ask genuine questions and don’t ask rubbish. People are usually good and teach you a lot when you ask them good questions
5) The Microsoft process is meticulous and you will enjoy it if you love solving puzzles. An opportunity to show your talent or aptitude is given to you if you ask.
6) For people looking for PM, read a lot(Newspapers/tech blogs/technologies), think a lot - that’s all you can do for it.
7

## Microsoft N/A interview

24.3k views
Vishal KrishnaFresherSelected
Application
I was interviewed on-campus at N/A for N/A role at Microsoft
Interview Process
Test Technical Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
15 questions
Interview Experience
Easy enough.
Since it was very easy, cut off for the next round was very high.

Following this round, there was coding round, with 2 questions in 60 minutes. This was also very easy. Only boundary cases had to be kept in mind.
1. Find nth node from last in a linked list.
2. Given in number in base2 format in a string, convert it to base4 format.

Since the questions were too easy, I had completed both the coding part in 6 minutes, and after checking for all the cases again, I left the hall when 14 minutes had passed by.
Round 2

### Technical Interview

Interview Experience
nterview started at 9 am. 21 students got through the coding round. Interviews began, few people had all their interviews( 2 technical, 1 AA), and some were sent home just after their first interview. I was still waiting for my turn.
At 3:30pm, it was my turn.
(Interview 1: Technical)
Called me to the waiting room. Interviewer came and took my CV. Asked me to wait until he had called me. After 5 minutes, he called me in.
My first interviewer was a very good observer. Even slightest movement of hands drew his attention.
(Advice: Manners are observed in all the interviews, make sure to follow basic courtesy and wear proper formals even though the company says you don’t need to)
So, after a brief intro, he asked me to tell me about myself. I began normally and started to dive into data structures and algorithms. (Advice: Tell me about yourself is the question you have to use to turn the interview to your interests. Tell Only whatever you are comfortable with, and be confident. Don’t be nervous.)
I then extended my introduction to courses I did online and projects and Machine Learning.
The interviewer asked me about machine learning. I started explaining him in a very easy, non-technical way using live examples I could get from the room itself. At one point during the explanation, when I was using a cookie as an example, he asked me weather I want to eat it. Offered me water after the explanation.
Then he asked about one of my projects in details which was related to machine learning.
Then he asked me: “A software. A box is there, with a ball moving in it. Solve it.” (Before reading ahead, think!)
I thought this is one of those questions where we have to ask many questions until the problem is clear. So I asked “Okay sir, so we have to make the ball move inside the box.” He said “No, the ball is already moving” and then he again went back to his laptop. After 3 seconds “Sir, so we need to make the ball rebound when it hits the boundary”. He said “yes, now write the code/pseudo code for this.”
(Advice: Always think out loud in an interview. Never be silent. If you are a good student, and think inside your head, or if you are a poor student and think inside your head, how will the interview differentiate?)
I wrote the pseudo code making the use of event and notifier inside class containing physics of ball and diagonals of the box. Some discussion happened here. Then he added one more ball and asked me how to handle this. I told him since I used event and notifier, I won’t have to make much changes, so my initial approach was right. Then he gave some corner test case like two balls and wall colliding all at once, what will happen etc.
(Advice: In open ended questions, often there is no good or bad solution. You should state adv. and disadv. of all the methods.
Then he asked me some simple coding question which involved creating a structure for values and sorting it.
(Advice: When you know many algorithms for a particular problem, state it with proper time complexity and adv and disadv.) I stated many sorting algorithms that could be used there and time complexity in each scenarios etc with advs of each one over the other.
“Why microsoft”, “Any other questions” etc.
Shook hands, told me the HR will tell you whats next.

*Was pretty confident after the first round*
After an hour (Round 2: Technical)
I went out to get chocolate(Snickers, I was hungry). Meanwhile my name was called. I was midway when someone came and told me I was called. Eating chocolate, I waited outside the interview panel for the bar to finish and then went in panting. The interview introduced himself and asked me weather I need water. I said yes and went out, finished the chocolate, drank water, relaxed and returned after 2 minutes. Greetings once again.

*I was packing my bags outside, after 10 minutes, call for round 3*
(Round 3: AA – As Appropriate interview) – most important round
The interviewer had lots of experience. He started with giving his detailed introduction and then asked me to give mine. (Environment was fun, asked me what people think about me when they meet me, then he gave his own opinion, and few other normal conversation going around) This round was relaxed, asked me about some real life problems. He said he already talked to other interviews about my technical skills and he knows that he need not test it. Gave me a situation on how to solve it. Gave a technical question and saw my approach. Then gave a problem related to machine learning (he wanted to know if I get excited only by coding problems or can I love other aspects as well). And then finally a scenario to test how I deal with people.
(I love psychology and have done many courses on it, so dealing with people was fun part for me). Finally he was happy and said to wait outside.
8

## Microsoft interview

28.4k views
AnonymousFresherSelected
Application
I was interviewed on-campus for Microsoft
Interview Process
Test Test Other Interview Technical Interview Other Interview
Round 1

### Test

No. of Questions
50 questions
Test Sections
• Section 1: Aptitude
Interview Experience
30 general aptitude type, 20 pseudo code type. The pseudo code type questions had no coding- just identification of error, correct o/p etc.
Interview Tips
The pseudo code type questionshad no coding- just identification of error, correct o/p etc.
Round 2

### Test

Test Sections
• Section 1: Coding
Interview Experience
Pure coding round just write code and submit (no compilation). There were three questions in this  round: Given an array and a number N,find whether there are tuples in the array with difference equal to N. Insert an element into a sorted circular linked list. Given a BST and an element N,output the leftmost node at the same level at that element in the tree.
Interview Tips
26 people were short listed from the aptitude test, out of which Iwas in the bottom 13.That meant another written test for me (which I latercame to know, was also counted as a round of interview) This test consistedof two questions: Given two linked listsrepresenting two numbers, each node containing the character representation ofa digit in the number,return a new linked lists representing their sum.Implement the strnstr()function in C from scratch. That is, find the nth occurrence of a string insidethe other, without using any library functions.
Round 3

### Other Interview

Interview Questions
• Question 1: Areas of Interest
Interview Experience
This round tried my patience! It was almost exclusively a discussionof my areas of interest. I said network security – so he went into the detailsof cryptography and attacks like buffer overflow. That went on for say 50minutes or so. After that he asked me a coding problem.The problem was to compress a string in place. Having seen thefamous string expansion in place problem many times, I promptly said run lengthencoding (i.e. compress aaaaaabbbbbccc to a6b5c3 for example). He asked me tocode it and write a few test cases for it.
Interview Tips
He asked me a coding problem.The problem was to compress a string in place. Having seen the famous string expansion in place problem many times, I promptly said run length encoding (i.e. compress aaaaaabbbbbccc to a6b5c3 for example). He asked me to code it and write a few test cases for it.This guy caught me on whatever word I uttered, which meant you need to be thoroughly prepared with whatever you say there. He knew literally everything and asked me to give ideas on weird things that he assumed I knew!
Round 4

### Technical Interview

Interview Questions
• Question 1: Tell me about yourself
• Question 2: How were your earlier rounds
Interview Experience
This was a nice, pure problem-solving round.First, he asked me the famous “Tell me about yourself” and “How wereyour earlier rounds” questions. But trust me, they were only ice-breakers. Then he started his session. He asked me to tell him beforehand if Iknew the solution to any problem. The following were his questions:WAP to print a matrix spirally.I told him I knew the problem so he skipped it.Search for an element in arotated sorted array (of course in sublinear time!). I tried a twist to binarysearch using rotations, but he pointed out an infinite loop in my code, which Ifailed to correct! Then he changed the question to find the number of rotationsin such an array in sublinear time. This also I could only solve for distinctelements. So he went to the next question.Really nice DP problem. Givenan amount and an array containing possible coin denominations, determine thesmallest no of coins in which the amount may be formed. Assume you have infinite units of each denomination.
Interview Tips
This guy was a cool one! He focused on only the problem solving skills and was able to catch any damn error,however small, in the code absolutely quickly. He focused on the way the problem is approached, at least as much as on whether one gets the solution.
Round 5

### Other Interview

Interview Questions
Interview Experience
This was the hardest and best round. The interviewer was a finalround specialist!First, he asked me about my internship, which I explained to him. Hediscussed it for hardly 10 minutes.Then he started his attack! Even this guy told me that if I knew aquestion, I should ask him to skip it. There were three questions here:Given a linked list, swap itsnodes pair-wise. This is not so simple as it looks, trust me. It has more edgecases than apparent and was a true test of pointer manipulation.Given an array, bring all itsdistinct elements to the top in whatsoever order; the rest of the array is notimportant. First I suggested in O(n) space. Then he asked me to do it withoutextra space. I needed a sorted array for that, which he asked me to assume.Then it is solvable under the required conditions.Given a matrix, find an elementthat is max in its row and min in its col. However, he said in the end, thiswas not the question. The actual question was whether there can be more thanone such element in the matrix, assuming all elements are distinct. Wrote a small proof that there cannot.
Interview Tips
1.One is expected to really know to code. Must have a good understanding of pointers and the ability to manipulate them quickly.2.These guys focus a lot on data structures, especially the basic ones like linked lists and binary trees. I felt these are the topics with max weightage (just my personal opinion!).3. Again my personal opinion:Rather than study many problems from various sites, one should try to solve them, even if a few, on one’s own.
Skills

### Skills Tested

Skill Tips
1.One is expected to really know to code. Must have a good understanding of pointers and the ability to manipulate them quickly.     2.Again my personal opinion: Rather than study many problems from various sites, one should try to solve them, even if a few, on one’s own.
General Tips
These guys focus a lot on data structures, especially the basic ones like linked lists and binary trees. I felt these are the topics with max weightage (just my personal opinion!).
9

## Microsoft Software engineer interview

29.8k views
Mayank BhuraFresherSelected
Application
I was interviewed on-campus at NIT Surathkal for Software engineer role at Microsoft
Interview Process
Test Test Test Technical Interview Technical Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
40-50 questions
Test Sections
• Section 1: C/C++ Aptitude Round
Interview Experience
All types of C/C++ Aptitude and I/O questions were asked.
Was not a very easy round.
Interview Tips
Prepare from http://www.geeksforgeeks.org/c/ and http://www.geeksforgeeks.org/c-plus-plus/
Other than that, you can prepare from "Test your C Skills" by Yeshwant Kanetkar. PDF available online.
Round 2

### Test

Duration
90 Minutes
No. of Questions
2 questions
Test Sections
• Section 1: Online Coding Round
Interview Experience
Two coding questions were asked. It was hosted on CoCubes website.
Questions were pretty basic.
First one was ad-hoc, requiring to count the number of set bits of a number.
Second one was the standard, minimum cost path DP problem.
Interview Tips
Prepare from geeksforgeeks, careercup and ambitionbox.
If you know competitive programming, you should not have much of a problem.
Round 3

### Test

Duration
60 Minutes
No. of Questions
2 questions
Test Sections
• Section 1: Written Coding Round
Interview Experience
Had to write code on paper. 2 questions.
First one was to rotate a matrix by 90 degrees. Pretty standard question.
Second one was to remove all negative elements in an array to the right end. Do it without extra memory.
Interview Tips
Apart from correctness of solution, they check for code quality. Code written must be clean, indented and with properly named variables and functions.
Keep communicating your ideas to the people who will be supervising the test. They will understand your thought process that way.
Round 4

### Technical Interview

Interview Questions
• Question 1: Write the backend server code for a tic tac toe game
Interview Experience
Wrote the class in JAVA. Explained the methods, and optimized them. Variables were named properly.
Also generalized the class for an nxn matrix tic-tac-toe game.
Interviewer was very friendly. Wrote the code on paper.
Interview Tips
Prepare on class design beforehand. They are quite likely to ask you questions on OOP.
Write clean code.
Round 5

### Technical Interview

Interview Questions
• Question 1: Write a program to store a tree on a file. Also write code to reconstruct the tree from that file. Think of efficient techniques.
Interview Experience
Just had to write the functions. Wrote code in C++.
The interviewer tested me on edge cases. Asked me to prepare test cases.
Interview Tips
Make sure your code is ready to tackle those dirty edge cases.
Knowing standard library functions is beneficial. Make sure you learn some important ones. They can come in handy.
Write clean code. You can choose any language you are comfortable in.
Skills

### Skills Tested

Skill Tips
A good internship helps in the process. I had interned at Google, so I got selected relatively easily as compared to other candidates. Make sure your resume is as impressive as you can make it.<br /> Stay calm in the rounds. That way you can think better.<br /> Communicate with the company officials. They will know you and your thought process that way. <br /> Don't stay quiet in the interview rounds. If you have doubts, ask them. I had made this mistake when they came for internships and did not get selected because I didn't clear my doubts. The interview should be ideally like a discussion, where you present your thoughts and ideas, clear your doubts, and come up with a solution.
Resources

### Preparation materials

Books
• Cracking The Coding Interview : Gayle Laakmann McDowell,
• Test Your C Skills : Yashwant Kanetkar,
General Tips
Stay calm. Prepare well.

Motivation for applying
It is one of the biggest tech giants in the world. I definitely wanted to be a part of it.
Funny Moments
Since I had only 2 interviews, while others had 5, I came out so early that they thought I was rejected.

They later discovered, they were wrong.
10

## Microsoft Software development engineer interview

28.4k views
Abhishek MishraFresherSelected
Application
I was interviewed on-campus at IIT Madras for Software development engineer role at Microsoft
Interview Process
Test coding Technical Interview HR Interview Other Interview
Round 1

### Test

Duration
30 Minutes
No. of Questions
15 questions
Test Sections
• Section 1: C
• Section 2: C++,
• Section 3: General tech
• Section 4: Quants
Round 2

### coding

Interview Experience
Write 2 functions(not entire programs) in C language on cocubes.com platform Q.1 Find an element in a rotated sorted array in O(log n) time. For ex. Find 4 in 7 8 9 1 2 4 5 A binary search technique could also do it in O(log n). They wanted an optimized binary sort and so I felt, the question wasn't clear enough. Didn't attempt it and told the interviewer the reason. Q.2  With a parent pointer in every node of a binary tree, find the in order successor of a given node. Solved only the second, but I ensured it could work on all boundary cases. Results of round 2 were declared on the day Microsoft visited the campus.
Round 3

### Technical Interview

Interview Questions
• Question 1: how I would have attempted the first question in round 2
• Question 2: Asked me my interests?
• Question 3: How would you find least common ancestor of two nodes in a binary tree?
• Question 4: How would you optimize it for a binary search tree?
• Question 5: Find a string in a 2D character matrix in any order(horizontal/vertical/diagonal)
• Question 6: How would you identify two nodes that have been swapped in a binary search tree?
Interview Experience
How would you find least common ancestor of two nodes in a binary tree? I said you could use two stacks, push nodes as you traverse and then compare when you are popping. He asked me to explain on the whiteboard. I did, but realised there was a problem, I looked at him and he was there, smiling as wide as he could. I asked for 2 minutes, and then gave him a better approach with a stack and a hash table. He seemed satisfied
Interview Tips
Keep talking while you are solving a problem/writing code. This keeps him informed of your progress and if you are lucky, you might receive some help. He repeatedly had been asking me stand up and sit to explain everything on the board. So eat adequately on any interview day.
Round 4

### HR Interview

Interview Questions
• Question 1: Asked me to write a function for reversing characters in a string.
• Question 2: Asked me to explain my projects.
• Question 3: a few HR questions about family, achievements, why Microsoft, future pla
Interview Experience
Asked me to write a function for reversing characters in a string and left the room. I wrote  4 lines of code to swap characters from ends. A vague question it was, he returned and explained what he wanted later. It was his fault but I politely apologized for not understanding the question. Remember: The boss is always right!

He wanted the string to be reversed alphabetically. So if it was "adecb", it should become "edcba". I wrote code. He had a 2-second glance at it, and then asked for an explanation
Round 5

### Other Interview

Interview Questions
• Question 1: Creative Interview
Interview Experience
A happy two hour discussion-cum-interview on designing another Facebook, all data structures, algorithms that can be used and features, optimisations that could be added. I asked him a few conceptual questions related to his subjects of interest and he answered delightfully. He gave me his email ID to contact him for more knowledge and for a second I missed my heartbeat, coz that might mean he won’t meet again. But results were announced and there he was, shaking my hands with a gleaming smile.
General Tips
Overall, it was a great experience interacting with them. Seemed to be a nice bunch of interesting people, looking for intellectual conversations with students.