Microsoft Interview Questions
- 1of 1 vote
AnswersAn infinitely long stream of bits coming one bit at a time. You have to tell (at any point of time), whether the decimal number is divisible by 3 or not .
- ashish March 25, 2012 in India for bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
Answerswhat does malloc return ?
- ashish March 25, 2012 in India for bing
what happens when you allocate memeory using malloc(sizeof(node)) in your code, where node is a pointer variable of list* node;| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C - 0of 0 votes
AnswersAn infinitely long stream of bits coming one bit at a time. You have to tell (at any point of time), whether the decimal number is divisible by 3 or not .
- ashish March 25, 2012 in India for bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersMS written test:
- vikdp01 March 25, 2012 in India
Given a list of words and a dictionary with many words. The dictionary may or may not include the the given list of words.
From the given list of words,you need to print only those words which are present in dictionary.
Mention time complexity.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer String Manipulation - -2of 2 votes
AnswersMS written test:
- vikdp01 March 25, 2012 in India
STRINGZ = STRINGX + STRINGY.charAt(index) ,
How can it be done using C language.
Also, I want to add a character in each function call.
e.g.
FUNC(mainstr,"");
FUNC(char *mainstr, char *current)
{
if(index==strlen(mainstr))
print("%s",current);
else
for(int i=0; i<strlen(mainstr) ; i++)
{
FUNC(mainstr, current+mainstr.charAt(i))
}
}
//replace current+mainstr.charAt(i) with C functions and code ..| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer String Manipulation - -1of 1 vote
AnswersGiven a number (lets say 10 digit) - print all possible words that can be made from a phone pad. Remember that number n can vary. Also some numbers like 2 have ABC (only three alphabets) while 7 can have (PQRS) 4 alphabets. Your algorithm should acommodate all these.
- whizz.comp March 24, 2012 in United States
(Kids do the above part - it is a classic programming interviews exposed question).
I used recursion to start with.
Space complexity is O(1) (not considering stack) - as we are just printing.
Worst case time complexity is (4^n). - all numbers are 7.
The trick question was - how much STACK space will recursive prog require? -- I bombed this trick ques. and got a reject.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiver two sorted arrays a[] and b[].
- niks March 24, 2012 in India
Merge them a[] in b[] in sorted order. Assume b[] has the extra space to accommodate a[]| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersGiven two binary trees T1 and T2 which store character data, duplicates are allowed. Devise an algorithm to decide whether T2 is a subtree of T1. T1 has millions of nodes and T2 has hundreds of nodes.
- pavel.em March 19, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
Answerssuppose we are getting an infinite binary stream of characters then after any point of time you need to print whether the no is divisible by 3 or not, how will you do that?
- Kingmaker March 17, 2012 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 2of 2 votes
AnswersSay there is a string hllsacefgdbdfdfdffd
- tarun.aggarwaltarun March 17, 2012 in India
You need to find the biggest string that has all consecutive characters
Conditions
consecutive string might have jungled words i.e acb is also continous or bcad is also continuous| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven a string "HELLOWORLD" .now you have to write a code to change this string into its ASCII value equivalent .
- winnie.gupta March 14, 2012 in India
For example the given string will have its Ascii equivalent string as "72697676798779827668".
The solution should be an inplace algorithm.| Report Duplicate | Flag | PURGE
Microsoft - 0of 0 votes
AnswersWhether a given BT is a BST or not.
- c_programmer March 13, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersImplementation of finding all the occurrence of a pattern in given text and then replacing it with some other string.
- c_programmer March 13, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersHow will you convert a BST to a Sorted doubly LL.
- c_programmer March 13, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersGiven a binary tree with each node has count (no. of children + 1). Write an inorder traversal to find the ith node in O(lgn).
- loosy.jhony March 12, 2012 in Dubai for AzurNode * ithNode(Node *root, int i) { // return ith node in Inorder traversal. }
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersSpiral traversal of an array.
- y2km11 March 08, 2012 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersFor String Reversal... how I address the space between the words in a sentence..where in it should be
- ariesgirl069 March 06, 2012 in United States
?
Not necessary inplace..any method is fine.
olleh dlrow| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersPredict the out put of the following code
#include<stdio.h> int g = 0; int Add(int i) { static int s=0; s =s+i; g=g+i; return s; } int main() { int s=0;int g=0,j; for(int i=1;i<=11;i++) { g=0;s=0; j = add(i); } printf("%d,%d",j,g); return 0; }
Predict the output
- soundararajanaravind March 06, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C - 0of 0 votes
AnswersGiven an Array With random 0s and non 0 numbers, shift all the 0s to the beginning and non 0s to the rear.
- soundararajanaravind March 06, 2012 in India
Eg: 1,9,8,4,0,0,2,7,0,6,0
Out put 0,0,0,0,1,9,8,4,2,7,6
i.e order of numbers not to change. Do it in place| Report Duplicate | Flag | PURGE
Microsoft Student student Arrays - 0of 0 votes
AnswersSuppose you have given a 10 digit mobile number (9903457235). Each digit in the number have 3 letters in mobile keypad. find/print all words which can be created by corresponding letter against digit given.. Total 3^10 words, I need complete recursive function.
- Sanjay Kumar March 04, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays - 0of 0 votes
AnswerWCF Implementation and Testing ?
- ariesgirl069 March 02, 2012 in United States for MSIT
Write performance test plans ?
How would you Develop Performance test cases across Lync features, Execute perf memory testing for eg: Lync
Execute perf time testing for Lync etc| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 0of 0 votes
AnswersFind 1st non-repeating char in string ?
- ariesgirl069 March 02, 2012 in United States for MSIT| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven a StackA, & an additional StackB implement PushBottom() and PopBottom() ?
- ariesgirl069 March 02, 2012 in United States for MSIT| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersWhats DLL and Net Framework how both are different..?
- ariesgirl069 March 02, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 2of 2 votes
AnswersFind all Subsets that sum upto 10. example
- ariesgirl069 March 02, 2012 in United States
int [] arr ={1,2,3,4,5,6}
Subsets are :
4,5,1
4,6
2,3,5 etc.
Any Suggestions ?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C# - 0of 0 votes
AnswersWhy an abstract class can not be instantiated ?
- ariesgirl069 March 02, 2012 in United States for IE| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C# - 0of 0 votes
AnswersGiven a set of points A [A1,A2,...,An] in a XY plane and given another point B, find the kth distant point in set A from B. example: 1st point would be the one at a shortest distance from B and so on. We need to find Kth.
- Dee March 01, 2012 in United States
I gave an alogorithm to calculate the distance of point B from every point in set A and then sort this result and return kth (complexity = O(n) +O(nlogn) (for sort nlogn). But I was asked to improve the complexity.
Can someone please help me with a solution with better complexity.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer