Microsoft Interview Questions
- 0of 0 votes
AnswersYou have given a huge array...millions of bytes..( aka sparsh array) . there are numbers in the array in the range x to y . how would you sort the array?
- yash February 04, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
Answershow to find the sorted median of a continuous stream of integers. let the stream is 0,1,2,3,4 the median is 2. now let -2 comes and the median for stream -2,0,1,2,3,4 still the median is 2 or it can be 1. now again -4 comes the median for the stream -4,-2,0,1,2,3,4 is 1.
- CAFEBABE February 01, 2012 in United States for windows| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersImagine you are a contractor who builds houses. Building of every house takes man power. Example: HouseA (manpower to build 20 days, profit when sold = 20K,
- Dee January 30, 2012 in United States
HouseB manpower to build = 5 days, profit when sold = 11K,
HouseC manpower to build = 5 days and porfit = 10.5K )
Write a function which takes total available manpower as parameter and returns which house building will give max profit.
So for this example if we pass 15 days to the function the answer would be HouseB and HouseC.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersGiven a set of strings (large set), and an input string, you need to find all the anagrams of the input string efficiently. What data structure will u use. And using tht, how will u find the anagrams.
- P January 22, 2012 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 1of 1 vote
AnswersGiven an array of 0's and 1's, and a number k, find the minimum window that contains k 0's. Write code.
- P January 22, 2012 in India for Bing
Extension, now the array contains integers from 0 .. 9 ... and another input array of size 10 is given, that contains the number of occurances of a digit. Find the min window that contains the given no of occurance for each digit.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersCOnsider the column names given in microsoft excel. A .. Z, AA ... Az, BA .... BZ, .......... ZZ, AAA, ..... and so on.
- P January 22, 2012 in India for Bing
Given a column name (string of charectors), find the corresponding number.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 1of 1 vote
AnswersGiven a matrix, whose rows and columns (n * n) are sorted. Given a number x, find whether it exists in the matrix. (I told him the O(n) algo, but he wanted a log n solution)
- P January 22, 2012 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - -1of 1 vote
AnswersGiven an integer, and a number k, do a cyclic shift (left / right) by k bits of the number.
- P January 22, 2012 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersFind the density of the given binary tree
- Umar January 21, 2012| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Trees and Graphs - 0of 0 votes
AnswersWrite a function to generate fibonacci number, The function takes two argument. The first one is the starting point of fibonacci series and second one is length. (e.g fib(3,4) will print 2 3 5 8). What are the test cases. Mention your top 5 test case. Mention your top 1 test case
- MangoPeople January 18, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 0of 0 votes
AnswersYou have a matrix that can have two values black or white. When adjacent cells in the matrix are black they make up a connected component. Write a function that prints out how many component are there in the matrix. Extension: say the matrix is vary large. How can you use multiple core of the processor to solve this problem.
- MangoPeople January 18, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 0of 0 votes
AnswersThere are two processes. One process(process 1) has a pointer to a variable in the other process(process 2). Now, can the variable be updated using this pointer in process 1?
- neha9.possible January 18, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Operating System - 0of 0 votes
AnswersGiven a uniprocessor system, is there any advantage of using threads when the process itself is pretty responsive?
- neha9.possible January 18, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Operating System - 0of 0 votes
AnswersYou have a string representation of a number. Convert it to integer value.
- MangoPeople January 18, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 0of 0 votes
AnswersWrite a function to detect anagram (eg. dad). Extension: Extend it for detecting multiple anagram(e.g dadana has 2 anagram.) What are the test cases. For test cases think about anagram embedded inside anagram (alala).
- MangoPeople January 18, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test General Questions and Comments - 0of 0 votes
AnswersSuppose you are given an ordered array of strings representing a file system. Ex: {'\', '\Documents\', '\Documents\School\', '\Documents\School\Project.docx', '\Documents\Work\', '\Pictures\', '\Pictures\me.jpg'}.
- nimbus January 17, 2012 in United States for Windows Live
Write a function that will take this array as input and build a tree.
From the example above, the tree would have a head with the value '\', which has the children 'Documents' and 'Pictures. 'Documents' has children with values 'School' and 'Work', and so on.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 1of 1 vote
Answersgiven a byte array.which consists of 1 byte char and 2 byte characters, 1 byte character can store value between 0-127,1st byte of 2 byte character can store value between 128-255 and 2nd byte of 2 byte character can store value between 0-255; given a position k find whether it is start of 1 byte character or 1st byte of 2 byte character or 2nd byte of 2byte character
- gladiator January 17, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft - 0of 0 votes
AnswersGiven a sequence of integers corresponding to a stock price over a period of time, write a function that will find the best day to buy and the best day to sell that will yield the most profit.
- nimbus January 17, 2012 in United States for Windows Live| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a time of day, write a function that returns the angle between the hour hand and the minute hand. For simplicity, you can create your own basic Time object to be used as a parameter for your function.
- nimbus January 17, 2012 in United States for Windows Live| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C# - 0of 0 votes
AnswersLets say you have a room with 100 doors in it. Initially, all of these doors are open. You have 100 people that will be entering the room. The 1st person toggles every door, 2nd person toggles every other door, 3rd toggles every 3rd door, ... , nth person toggles every nth door. How would you determine the state of all 100 doors after all 100 people have entered the room?
- nimbus January 17, 2012 in United States for Windows Live| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersAssume you already have a function that returns a random integer between 0 and integer max (2^32). Create a random number generator that will return an integer between a user-specified range R1 and R2. You can assume that R1 < R2.
- nimbus January 17, 2012 in United States for Windows Live| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer C# - 0of 0 votes
Answers"DESCRIBE" and write code to return LCA of any two given nodes in __Binary Tree__.
- AmzFAILFacebookFailMSFTFail January 17, 2012 in United States for Windows Live!| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersDelete a node in Linked list.
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven 2 arrays which are sorted in non-decreasing order and your told that one of the two arrays have sufficient memory allocated to have elements combined from both arrays, merge the arrays and keep the sorting order.
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersHow do you improve IE?
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersTest address bar in IE.
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven a sentence, count the palindromes inside the sentence. Do not worry about the palindrome inside a palindrome. Write test cases.
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven two integer arrays which may contain duplicates, report the intersection of both the arrays.
- USC Trojon January 17, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersDesign the autocomplete feature (ex:Google Suggest)
- topcoder99 January 14, 2012 in United States for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 1of 1 vote
AnswersGiven a file, return the list of all the words which occurs exactly n times in the file
- topcoder99 January 14, 2012 in United States for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm