Microsoft Interview Questions
- 0of 0 votes
AnswersSuppose you are a search engine owner and want to show adv to make money. How will you filter the advertisements to be shown when users searches for something. Take into consideration that advertisers will not be interested in showing adds to all geographical locations and some types of add may be banned in some locations.
- seeker January 13, 2012 in India
For eg : There is a alcohol selling company. Now alcohol adv is banned in india so this advertisement should not be shown. Also an adv in India might not want to show add in Europe. But Advertisement for Alcohol consulting or addiction etc can be shown. So if someone types alcohol rehab then what strings you will search ? how ill you define which all strings to be searched for ? and what data structure will you use to search ? and what is the algorithm for it ?
Define the algorithm and data structures you will use.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersFlatten a binary tree in the its inorder traversal form. Example if there is a tree like
- Dee January 12, 2012 in United States
01
0203
04050607
Flatten it to 04->02->05->01->06->03->07
Right of 4 should be pointing to 02 and so on.
The order is inorder traversal order
I was asked to use Recursion
PLease can some one post C# code for this.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersSuppose an array is of the form [i1,i2,i3,i4,c1,c2,c3,c4] where i[1..n] are integer elements and c[1..n] are character elements. Write an in place algorithm so that the resulting array is of the form [i1,c1,i2,c2,i3,c3,i4,c4]. State optimised time and space complexities.
- user4321 January 11, 2012 in India
Example: array: [1,7,9,4,a,x,r,d] should become [1,a,7,x,9,r,4,d].| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a string "abcd" print combinations of length n. Example if n= 3 print abc, abd, acd, bcd. Was asked to use recursion. Can someone please help me with a C# recursive function for this.
- Dee January 10, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersWrite jQuery code to alert a message box when you click on a paragraph with the content of paragraph.
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Front End Web Development - 1of 1 vote
Answer* Why Microsoft?
- blue-j January 07, 2012 in United States for Global Foundation Services
* What is Cloud Computing?
* How would you design a software application? Discussion about software and hardware requirements. How would you handle increase in load? How would you manage the increase in load without additional hardware?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Behavioral - 0of 0 votes
AnswersWrite efficient code for Singleton class. I wrote the double-checked locking version. Then he asked for other approaches specifically to reduce the number of lines of code :-/
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersYou have 2 character arrays. The arrays have characters ranging from a-z (all small letters).
- blue-j January 07, 2012 in United States for Global Foundation Services
1. Merge the two arrays
2. Sort the array
Perform the above in O(N)| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersConvert the matrix into a linked list (singly or doubly). Nodes have two pointers - right and down.
- blue-j January 07, 2012 in United States for Global Foundation Servicesa1-a2-a3-a4 | | | | b1-b2-b3-b4 | | | | c1-c2-c3-c4
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind first two numbers whose sum equals a given number in infinite length (stream of numbers) singly linked list.
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite HTML/CSS code to put odd images on left and even number images on right with some text content (basically float images).
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Front End Web Development - 0of 0 votes
Answers(Don't remember the exact wordings) You have 25 red balls, 47 green balls and 3 blue balls in a basket. What is the minimum number of balls you have to pick to make sure you have at least 2 balls of different colors?
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswerDo you know about design patters? What is Singleton?
- blue-j January 07, 2012 in United States for Global Foundation Services| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersOperating Systems (in windows):
- blue-j January 07, 2012 in United States for Global Foundation Services
* Difference between Process and Thread
* Deadlock
* Race condition| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Operating System - 0of 0 votes
Answerscode up a system that will accept a series of telephone keypresses and return a list of possible names from a supporting data structure. Describe both the data structure and the insert and search methods
- angel.ruiz1@upr.edu January 03, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven 2 dimensional sorted array(Both row and column wise sorted) write a efficient code to find median.
- cxc January 01, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answerswrite test cases to test a program given to check whether two numbers are anagram or not.
- neha9.possible December 30, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Testing - 0of 0 votes
Answersgiven a binary tree, write a code to update each node with the sum of values of its subtree.
- neha9.possible December 30, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersgiven a 2 dimensional array with elements sorted in increasing order both row wise and column wise..write the code for an efficient algorithm to search for a particular element.
- neha9.possible December 30, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersgive an algorithm for finding duplicate parenthesis in a expression.
- compskiguy December 09, 2011 in India for Bing(( a + b ) * (( c + d )))
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersFor those who get bored of sorting/hashing/string manipulation problems, here is the geometric one:
Given n lines in the plane (for simplicity assume no 3 lines intersect at one point). Count the total number of triangles in the plane created by these lines. Observe that smaller triangles may be part of larger ones.
Look here for example:
- pavel.em December 06, 2011 in United States
h t t p://farm8.staticflickr.com/7021/6465828833_15e7447992_z.jpg| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
AnswersA stream of 1's and 0's are comming .At any time we have to tell that the resultant number from the binary digits till that point is divisible by 3 or not .For eg: let's see one example.Let 1 come (not div by 3) .then 1 come so resultant binary number is 11(3) which is divisible by 3 , then 0 come make it to 110(3) which is divisible by 3, then 0 come make it to 1100(12) which also divisible by 3 .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a BST and two values m and n . We need to find out all the nodes whose values are in range of m and n .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Trees and Graphs - 0of 0 votes
AnswersThere are 100 prisoners , and a officer of them . Now the officer gave the command to the prisoner that next day they will be going to wear a hat which they will not be know its colour . But its colour will be either Red or Blue . And he says that all the prisoner will be standing in a line . And then the officer will start asking the color of the prisoner one by one from the back . whichever prisoner says the wrong color of his hat ,gets shoot .So now we have to find out wat strategy should the prisoners should apply to safe maximum prisoners .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersIn a plane we are given latitude,longitude coordinate , and we are also given a point(having lat,long value) . We need to find out the nearest point , in most efficient way .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind all the permutation of the given string ? But take care of duplicate characters .
- raiprince001 December 06, 2011 in India for Bing
The sorted array is rotated by some factor . And we need to search a key .?O(logn) ?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersRandom pointer is present in every node of the linked list . And they will be pointing to any of the node of the list . We need to clone this list and return it .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersEdit Distance ?
- raiprince001 December 06, 2011 in India for Bing
Print the M*N matrix in spiral way .
Given a Node in a binary tree . We need to find out all the nodes at K distance fron that node .| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere is a Directory in which there are subdirectories and recursively have subdirectories . We need to find out is any subdirectory is pointing to its any of its ancestor .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm