Microsoft Interview Questions
- 0of 0 votes
AnswersDesign a voicemail system. Would you use RDBMS or File system, provide rationale.
- IntwPrep.MS January 17, 2014 in United States for Bing| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswersAn application is crashing the moment it is opened, how would you test it.
- IntwPrep.MS January 17, 2014 in United States for Bing| Report Duplicate | Flag | PURGE
Microsoft Senior Software Development Engineer - 0of 0 votes
AnswersImplement Stack operations using two queues. I wrote some code, later he asked, how many elements could be added to this queue. (My code was like this Queue<Integer> q1 = new Queue<Integer>(); ) What would be the maximum number of elements that this queue would accomodate? My code was in java.
- Madan January 16, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE1 Algorithm - 1of 1 vote
Answers
- Srigopal Chitrapu January 15, 2014 in United StatesIn given array find zero and replace the entire row and column with zeros E.g Input: 1 2 3 4 5 6 7 8 9 10 0 11 12 13 14 15 Output: 1 2 0 4 5 6 0 8 0 0 0 0 12 13 0 15
| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Arrays Coding Matrix - 0of 0 votes
AnswersHow to sort 2 queues without additional containers?
- Gaile January 15, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE1 - 0of 0 votes
AnswersDesign database locks to allow r/w concurrency and data consistency.
- lianshiwu January 08, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Threads - 0of 2 votes
AnswersDesign a Logging mechanism. Should be thread safe.
- R@M3$H.N January 07, 2014 in India
Initially i came up with Command Pattern, and write into a File. Was asked how i will synchronize multiple threads writing into Same File?
Later he gave hint about Aspect-oriented Programming(AOP). And also he gave a hint of Not always writing into the File, can also be a Mail,etc..| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Data Structures Problem Solving System Design Threads Unix - 0of 0 votes
AnswersYou have a directed graph that is quite generic (has disjoint parts, cycles, etc). Please find the first loop you hit when traversing and print the nodes in the loop. Assume data is an integer.
- Anon123 January 04, 2014 in United States| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 5of 5 votes
AnswersYou are given an array of n elements. The elements have are n-bit long too.
- Anon123 January 04, 2014 in United States
Now n here represents the number of employees in a company. Element with index 0 is information about employee 0, at index 1 is information of employee 1....
For each element, the bits represent whether that employee works (not same team... just works) with employee at that index.
Ex. element 0 = 0110 => emplyee 0 works with employee 1 and 2
element 1 = 1001 => emplyee 1 works with employee 0 and 3
...
Put employees in groups in which they work. The transitive property is applicable here i.e. if A works with B and B works with C, ABC will be in one group.
The solution needs to efficient in terms of run time and memory. I hope the above is clear.| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 1of 1 vote
AnswersThree points are given A(x1, y1), B(x2, y2), C(x3, y3). Write a method returning an array of points (x, y) inside the triangle ABC.
- BB December 28, 2013 in Serbia| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersTest the unknown code. You can not see the code, and the only way to test it is through this function: (the 3 arguments are inputs of the unknown code)
- ccww December 24, 2013 in United States
void test(string s, int* a, double d){
//black box code
...
...
}
How do you test it to ensure that the code is robust?| Report Duplicate | Flag | PURGE
Microsoft Intern test - -1of 1 vote
Answerswhat is the best,worst and average case complexity for fibonacci no.s ..explain?
- rvndr December 22, 2013 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersRemove duplicates from a string inplace. The algorithm should be as efficient as possible.
- alex December 19, 2013 in India
I gave two approaches. First, the simple comparison O(n2) and second, sorting O(nlgon). But the interviewer did not seem satisfied.
Can someone please suggest a better algorithm?| Report Duplicate | Flag | PURGE
Microsoft Intern Algorithm - 0of 0 votes
Answersdesign a data structure to store time series and implement add operation
- rajkobie95 December 16, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Applications Developer - 0of 0 votes
AnswersGiven a number of arrays where:-
- biraja1985 December 16, 2013 in India
Arr-1={1,2,3,4,5,6,7,8,9 ... N}
Arr-2 is formed by eliminating all the elements that satisfy x*2 from Arr-1 (x belongs to natural numbers) ie.
Arr-2={1,3,5,7,9,11,13,15,17,19 ... }
Similarly Arr3 is formed by eliminating all the elements that satisfy x*3 from Arr2 (x belongs to natural numbers) i.e.
Arr3={1,3,7,9,13,1519,21,25,27 ... }
Arr-k is formed by eliminating x*k elements from Arr-(k-1).
Given number "z" and Array suffix "k" Find if z exists in Arr-k
(with as space and time minimum complexity as possible)| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
AnswersIdentifying the number of occurrences of each palindrome in a file
- difuser123 December 15, 2013 in India| Report Duplicate | Flag | PURGE
Microsoft SDE-2 - 0of 0 votes
AnswersA node which has following fields
- Nascent December 15, 2013 in United States
a) data
b) next_ptr
c) prev_ptr
can be used to represent doubly linked list, binary tree or none. Given a random pointer recognize whether it forms DLL, Binary Tree or none.| Report Duplicate | Flag | PURGE
Microsoft - 0of 0 votes
AnswersConsider a binary tree for which root node and a target node are given to you. Give the next sibling of the target.(let the target be in level k, then you need to give the immediate node which is in level k)
- Nascent December 15, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft - 0of 0 votes
AnswersPrinting diagonals of a matrix
- rajkobie95 December 14, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswersHow would you structure the game of life (classes, functions etc...)? How would you structure the board if it was played on a sphere?
- rajkobie95 December 14, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Brain Teasers - 0of 0 votes
AnswersFind the degree of separation between two people (e.g. LinkedIn's connected feature)
- rajkobie95 December 14, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Brain Teasers - 0of 0 votes
AnswersFind the maximum-sum subarray of an array.
- floatingsms November 29, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Intern Arrays - 0of 0 votes
AnswersWrite a function to validate the integrity of a binary search tree.
- floatingsms November 29, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer Intern Algorithm - 4of 6 votes
AnswersArrange the numbers in an array in alternating order.
- codefreak November 16, 2013 in United States
For example if the array is [a1, a2, a3, a4.. ]arrange the array such that b1<=b2>=b3<=b4 and so on.
Sampe Input: 3 5 7 8 4 9
Sample Output: 3 < 5 > 4 < 8 >7 < 9| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays - -1of 1 vote
AnswersWrite code for removing alternate duplicate characters (case insensitive) in a string in place. Also give test cases.
- oxymoron November 16, 2013 in India| Report Duplicate | Flag | PURGE
Microsoft Intern Algorithm - 0of 0 votes
AnswersYou have three covered baskets labelled "Apples", "Oranges" and "Mixed." All of them are labelled incorrectly. Choosing only one fruit from one of the baskets (and not peeking inside), how can you determine how to relabel the baskets?
- peaceloveharmony@live.ca November 15, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Intern Problem Solving - 0of 2 votes
AnswersYou have a gold bar with seven segments. For seven days, you must pay an employee with one gold segment each day. Breaking the bar only twice, how can you ensure the employee gets paid appropriately?
- peaceloveharmony@live.ca November 15, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft Intern Problem Solving - 0of 0 votes
AnswersDesign a controller for kids.
- ootah November 14, 2013 in United States for Office
(This is a PM interview question, so you're supposed to clarify a lot to clear ambiguity before you get to an answer)| Report Duplicate | Flag | PURGE
Microsoft Program Manager General Questions and Comments