Home Company Questions Microsoft Interview Questions Microsoft Interview Questions - 5

Login Form




Microsoft Interview Questions - 5 Print E-mail

1. Here are four dogs, each at the counter of a large square. Each of the dogs begins chasing the dog clockwise from it. All of the dogs run at the same speed. All continuously adjust their direction so that they are always heading straight towards their clockwise neighbor. How long does it take for the dogs to catch each other? Where does this happen?

(Hint: Dog's are moving in a symmetrical fashion, not along the edges of the square)

 

2. How would you move Mt. Everest?

 

3. There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don't collide?

 

4. Given two arrays of numbers, find if each of the two arrays have the same set of integers ? Suggest an algo which can run faster than NlogN ?

 

5. Given 1000 bottles of juice, one of them contains poison and tastes bitter. Spot the spoiled bottle in minimum sips?

 

6. Why is it that hot water in a hotel comes out instantly but at home it takes time?

 

7. On an average, how many times would you have to open the Seattle phone book to find a specific name?

 

8. Assume you have an array that contains a number of strings (perhaps char * a[100]). Each string is a word from the dictionary. Your task, described in high-level terms, is to devise a way to determine and display all of the anagrams within the array (two words are anagrams if they contain the same characters; for example, tales and slate are anagrams.)

Begin by sorting each element in the array in alphabetical order. So, if one element of your array was slate, it would be rearranged to form aelst (use some mechanism to know that the particular instance of aelst maps to slate). At this point, you slate and tales would be identical: aelst.
Next, sort the entire array of these modified dictionary words. Now, all of the anagrams are grouped together. Finally, step through the array and display duplicate terms, mapping the sorted letters (aelst) back to the word (slate or tales).

 

9. If you look at a clock and the time is 3:15, what is the angle between the hour and the minute hands? ( The answer to this is not zero!)

 

10. Whats the difference b/w a thread and a process? are Word and PowerPoint different processes or threads of a single process?