Microsoft Interview Questions
- 0of 0 votes
AnswersWhy Microsoft? Why did you choose this major for Masters. what are good coding practice? How do you grade yourself as a coder/programmer.
- Anonymous December 14, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Behavioral - 0of 0 votes
Answersinterview:
- Anonymous December 05, 2010
Implement run length encoding and decoding.
Input:
aabbccaa encode:2a2b2c2a decode will be the input
Input: abcd encode:abcd decode:abcd
input:3122a encode:3122a decode:3122a
etc.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
Answerstest atof(char *s)
- Anonymous December 05, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
Answerswritten test:
- Anonymous December 05, 2010
print all the leaves of a binary tree(may not complete) as a link list.
1
/\
2 3
/\
4 5
output as a list: 4->5->3->NULL| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersHow do you test a function which would return the second smallest number in a BST?
- Guest December 04, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing - 0of 0 votes
AnswersBangalore written test
- Anonymous December 04, 2010
fucntion prints given 2d array in spiral fashion. give all test cases to test it| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersString s1 = bacdeg
- Anonymous December 04, 2010
String s2 = bcdaeg
write an algorithm which will return position of first character of string s1 that is appearing in s2
here postion of 'a' in string s2 as it is the first character of s1 that is coming in s2| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersBangalore written test
- Anonymous December 04, 2010
C function was given to find out the occurance of character "A" from an array. Need to find out the bugs in program.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersQuestion asked in microsoft written test :
- Anonymous November 22, 2010
Write a function which finds a substring in a string and replaces all such occurances with another string. Prototype of the function :
char* FindReplace(char* src, char* find, char* replace);| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C - 0of 0 votes
AnswersGiven an array containing lower case and upper case alphabets and numbers, how can you sort/arrange the array in one single pass using just one variable for swapping such that the resultant array should put the input elements into 3 buckets in the following fashion -
- YT2010 November 18, 2010
Input - aA1B23Cbc4
Output - abcABC1234
Note - ordering doesn't matter
the output could be -
ABC1234abc or 1234abcABC
You just have to arrange the data into 3 buckets in single pass using just one temp variable for swapping. Expected runtime - o(n)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Arrays - 0of 0 votes
AnswersGiven two strings, find the number of occurrences of one within the other . eg s1=" the cow ran over the dog" s2="the" answer =2. Also, take care of repetitions eg. if s1= "ABCBCBC" and s2="BCBC" then answer=2
- Soanli October 24, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven a n array of positive and negative integers, find the subarray with max sum in O(n) and one loop.
- Soanli October 24, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersHow do you test function Add that adds two linked lists?
- Soanli October 24, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Linked Lists - 0of 0 votes
AnswersFind the frequency of each letter in a string. then test it.
- Soanli October 24, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
Answersfind one missing card from deck of 51 card
- movence October 18, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersAfter writing the code I was asked to turn over the paper and create/draw ten test cases to test my program.
- M October 17, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing - 0of 0 votes
AnswersWrite a function that takes in two rectangles and returns true if the overlap and false if they do not.
- M October 17, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersWrite code for finding square root of a given no.
- Billa October 13, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersReverse words in a string
- Anonymous October 08, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersI was asked to implement the something like 4*5+9
- Anonymous October 08, 2010
there can only be integers and only + - * and / operand| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Coding - 0of 0 votes
AnswersWrite a code to find if two linked list intersect.
- Anonymous October 08, 2010
I told two ways one by counting the length of the two linked list and then advancing the the bigger linked list by the difference in length and then advancing both the pointers simulataneously to check if they intersect.
Also i told a method to join the last node of a linked list to the first node and checking if a cycle exist.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersHow to find the longest palindrome is a string
- Anonymous October 01, 2010| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 0of 0 votes
Answers1. Given a binary tree print the nodes in this order:
- manu September 20, 2010
all the left most nodes from top to bottom, then all the leaves, then all the right most nodes from bottom to top, then the root. like
10
5 15
3 2 12 17
you would print 5 3 2 12 17 15 10| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
Answers21200
- rst September 19, 2010
01234
here, the bottom string represents the actual numbers(01234), the upper string represents their counts(the same also represents numbers)
so, there are two 0's, one 1, two 0's, zero '3', zero '4'. Find a sequence of length '9' which satisfy this property.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersFind output of the following code
- Gangadhar September 18, 2010
int
mingle(int a, int b)
{
int c = b/2;
if (b<=1) { return a;}
cout<<c <<endl;
return a*(b-2*c) + mingle(a,c);
}
int
main()
{
int i;
for (i = 1; i<=5 ; i++) {
cout<<mingle(i+1,i-1)<<endl;
}
return 0;
}| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ - 0of 0 votes
Answersimplement:
- Anonymous September 15, 2010
float evaluate(char* s)
for example:
input: "1+2.5" output: 3.5
output: "4-5*8+4/2" output: -34| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm