Microsoft Interview Questions
- 0of 0 votes
AnswersGiven a m*n matrix and a person is sitting in (0,0) box, and he has to go to the (m-1,n-1) box of the matrix .And the person can only go to right or down box from its current box position . We need to find out the number of ways he can reach from start to destination box .
- raiprince001 December 06, 2011 in India for Bing| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Brain Teasers - 0of 0 votes
AnswersWrite a function to reverse a UTF-8 encoded string in-place.
- harshkumar1 December 04, 2011 in India for MBD| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 1of 1 vote
Answershow to find a duplicate element in an array without using extra memory....do this in O(n)?
- vineetsetia009 November 20, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersYou have two arrays A and B of strings. In the array B all element are from A except one. ex:
- sonali.kapor007 November 17, 2011 in India
A = {"abc", "bcd", "dpr"};
B = {"abc", "mnp", "bcd", "dpr"};
You have find out the string which is extra in B in O(n) time.
In the above example it is "mnp".| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersThere is a very Primitive Database and it has a table say "Travel". The content of table is as follows:
- Mi Jalgaonkar November 15, 2011 in United States
Source | Dest
--------------
Sea | LA
LA | FL
LA | MA
FL | Sea
Sea | FL
The ask is to find out all routes between (Sea) to (FL) with mininum hop.
the Result would be:
1. Sea -> FL
2. Sea -> LA - > FL
You have to write a Middle tier function to achieve above result. You can assume there is DBAPI that return the Destination city if you provide the source city.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersThere are three arrays of numbers A,B and C. You have to find out all tuples <a,b,c> such that a-b = c where a is from A,b is from B and c is from C.
- sonali.kapor007 November 14, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answersconvert a double-precision number to rational, i.e.:
- pavel.em November 14, 2011 in United States
0.125 -> 1/8
don't care about arithmetic overflow| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
Answers
- sonali.kapor007 November 14, 2011 in IndiaGiven an array and a number K. You have to find out longest subset from the array whose all pair sum will be greater than k. ex: {8,3,4,1,6,2,5,7,9} and K=12 ans: {8,6,7,9} or {5,7,8,9}
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersUnder which conditions the default assignment operator
- pavel.em November 14, 2011 in United States
is not generated by the compiler for your class ?
(assuming that you do not declare the assignment operator yourself)| Report Duplicate | Flag | PURGE
Microsoft C++ - 0of 0 votes
AnswersWe have a job sequence like this.
- JobHunter November 11, 2011 in United States
A
/ \
B --C
This case A's dependent jobs are B & C
B's dependent job is C
C's Dependent job is null
If we need to complete any of the steps we should need to complete the dependent object.
This case job sequence will be C->B->A
Can anyone comeup with simple o(n) solution for this?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersYou have given a file containing sentences. Now you are given a sequence of characters. You have to find the starting location of each word containing one of the permutation of the word.
- hulk November 11, 2011 in India
e.g File - 'She submitted her assignment.' Input Sequence - imt. Since the file contains the word 'submitted' containing the sequence 'mit' which is a permutation of 'imt' So it will return 1. Similiarly it will return for all other words.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm Data Structures - 0of 0 votes
AnswersHow to rotate the array with o(n) or o(nlogn)/
- JobHunter November 11, 2011 in United States
eg) A[]={A,B,C,D,E} rotate Index - 2
It should be {C,D,E,A,B}| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays - 0of 0 votes
Answersoutput all dates "Fridays, 13th" in the format dd.mm.yyyy starting from 1st Jan 1900 (Monday)
- pavel.em November 10, 2011 in United States| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
AnswersHow you will test a random number generator?
- MangoPeople November 10, 2011 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersDesign the system for threater reservation system. for example Seat or chairs are organized in the form of rows and columns. When the first person come and book the ticket need to provide a seat on the middle of the last row. When next person come we have to provide empty space between the existing audience and book the ticket for the set of people. How we will design this system?
- JobHunter November 05, 2011 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Application / UI Design - 0of 0 votes
AnswersIn a nxn matrix, data provided like below. We need to find the groups of 1s with the adjustent column and row.
- JobHunter November 03, 2011 in United States
eg)
0 0 0 0
1 1 1 1
0 0 0 0
group of 1 is 1
1 0 0 0
0 0 0 1
1 1 0 0
group of 1s is 3
Any thought how to get the set of groups.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Matrix - 0of 0 votes
AnswersHow would you design a class for a wrist watch?
- rajat.garg.05 November 02, 2011 in -| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
Answerswrite a function that given two strings s1 and s2, it will return s1 Minus s2, and it has to use same s1 location.
- mirinda November 01, 2011 in India
ex: s1 = "abcdB" ,s2 = "b" ,s1 Minus s2 = "acdB"| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding - 0of 0 votes
AnswersTest cases for chat application (lyk MSN ,YAHOO CHAT,GTALK etc).
- msankith October 30, 2011 in India| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Testing - 0of 0 votes
AnswersQuestion 3)
- msankith October 30, 2011 in -
Given an crypted array obtain the original text . Should be implemented without extra space .
Eg: Crypt array : a3b4c3
decrypt array : aaabbbbccc
Imagine the array contains sufficient memory to hold the decrypt ?| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Arrays - 0of 0 votes
AnswersQuestion 2)
- msankith October 30, 2011 in India
Given a binary tree which contains values at each node , find whether the path exist from root to the "LEAF NODE" such that sum of the values of d path nodes is equal to the GIVEN SUM. if so return true or else return false| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Trees and Graphs - 0of 0 votes
AnswerWhat is your favorite software product and how would you improve it?
- ajay.skootergofast October 29, 2011 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersImagine a bit map representation of a television screen.write code to Go to a position (x,y) on the screen and flip the bit i.e. 0 to 1 or 1 to 0? He told me that I should ask a question as to what is the length of the screen or height of the screen to implement it which i didn't.
- ajay.skootergofast October 29, 2011 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Algorithm - 0of 0 votes
AnswersGiven a tree, parse the tree using breadth first search and then find the last element in the tree. After finding the last element, replace that element with the root node. Eg. Input:
A B C D E F G
Output:
- naphstor October 29, 2011 in United StatesG B C D E F A
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Data Structures - 0of 0 votes
AnswersGiven a binary search tree. Find the maximum depth of the binary search tree iteratively.
- cinderella October 29, 2011 in United States for Windows Live| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersYou are given a tree where child nodes point to parent (there is no link from parent to child). Give any two nodes in the tree, write a function to find the lowest common ancestor.
- puneetagrawalin October 28, 2011 in United States
Node* LCA(Node *p, Node *q){
}| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer - 0of 0 votes
AnswersFind numbers in an array that sum to a certain number....Once number is found return the index of both the numbers...We are not allowed to use Hashmap or any other DS...we have to do it inplace...using the same array
- vran.freelancer October 25, 2011 in United States for ERP solution| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Arrays