Microsoft Interview Questions
- 0of 0 votes
AnswersOnsite Interview: Given a tree, find out if the tree has a given sum or not.
- Anonymous January 24, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 3of 3 votes
AnswersPrint all possible palindromes(of length >2) for a given string.
- Anonymous January 24, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersOnsite interview: Given two strings, return the last index of a given substring in a string
- Anonymous January 24, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersfirst round screening at college: Given two arrays find intersection.. i discussed two approaches.. hash based and merge based.. was asked to talk about the complexities and explain when and why, which is better
- Anonymous January 24, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere is a row of houses in which each house contains some amount of money. Write an algorithm that loots the maximum amount of money from these houses. The only restriction is that you cannot loot two houses that are directly next to each other.
- Anonymous January 19, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite a function that rotates and MxN matrix. Even though the matrix is MxN, you are given it in the form of a 1 dimensional array.
- Anonymous January 19, 2011
int[] Rotate(int[] arr, numRows, numCols)
Does not need to be in place.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersPrint the nodes of a binary tree by level (breadth first)
- Anonymous January 19, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven 2 strings S1 and S2, Check the first charaster that is repeated in S2.
- Anonymous January 17, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven array of n integers and given a number X, find all the unique pairs of elemens (a,b), whoose some is equal to X.
- Anonymous January 17, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven a stream of N integers which has the property that no integer is more than 1000 positions away from its sorted location, how would you output the integers in sorted order while using constant storage?
- coder January 08, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersHow do you test a keyboard
- judy January 06, 2011| Report Duplicate | Flag | PURGE
Microsoft - 0of 0 votes
Answershow to serialize and deserialize a n-ary tree?
- Hai.Vincent January 04, 2011| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersMy last round was pretty simple in which he wanted a depth first traversal of a tree for which i gave him the preorder traversal..
- See December 29, 2010
I had time left in this round so he gave me another problem in which I was given a triangle class and he asked me what were the interesting cases where there arises a possiblity that the code may break.
My answers were tri(int a ,int b,int c)
-Niether of sides shd be 0
-sum of two sides greater than the third.
-No side shd be greater than INTMAX and also if a = INTMAX -6 , b = INTMAX -6 , c = 20
For this case there may be an int overflow so i told him that instead of checking for a+b>c we could check whether c> a-b, so that there would be no overflow.
I thought I had done my interview well and was confident i would be selected but I donno what happened they rejected me.. But it was a great experience....| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersMy third round question was
- See December 29, 2010
How do you find the 3rd largest word in a given string that is millions of characters long and he wanted me to give a solution in only one pass ?
I gave him a solution with arraylists and he was like it is too expensive using them .
Then i gave him a solution to find in a single pass in the same way we find the third largest number in a set of intergers ..| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswerHad an onsite interview with Microsoft on 17th Dec .. Accommodation and travel was provided and they make sure that the interviewees are in their best spirits before the interview.. I was listed to be interviewed with the windows windows live group for DEV and mine started at 8.00AM in the morning and I was scheduled for 4 interviews each of which were 45 mins long.. Did not land into the job though but it was a great experience as this was my first interview.. The interviewers were really nice and helped a bit whenever i was stuck..
- See December 29, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
Answersrearrange an array of integers such that on one side you have all even numbers and the other side you have all odd numbers.
- Anonymous December 28, 2010
now among the even numbers, they should be sorted and among the odd numbers they should be sorted| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersfind max and min in an array with the least number of comparisons
- Anonymous December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answershow do u remove duplicates from a list.
- Anonymous December 28, 2010
1. list is sorted
2. list is not sorted| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersfind all permutations of a string
- Anonymous December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answershow do you know if a tree is a bst or not
- Anonymous December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersdesign a data structure for a DNS server
- Anonymous December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Data Structures - 0of 0 votes
Answerswrite down String class copy constructor ?
- siva.sai.2020 December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
Answersfind a bug in following code : class A { public: static int i; void print() { cout<< i << endl ; } }; int main() { A a; a.print(); }
I run above code, and I am getting "ndefined reference to `A::i'" . Why I am getting this error ?
- siva.sai.2020 December 28, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test