Home Company Questions Microsoft Interview Questions Microsoft Interview Questions - 2

Login Form




Microsoft Interview Questions - 2 Print E-mail

1. IF the Fibonacci series is 1,2,3,5,8,13,..... then 10 can be written as 8 + 2 ==> 10010,  17 can be written as 13 + 3 + 1 ==> 100101

 

2. Given an Ellipse class can you derive a Circle class from it? What all methods would you include in the circle class and what all in ellipse? Design a class of curve from which Circle and Ellipse can be inherited.

 

3. Given a unit square with a number of lines passing through it. These lines are not parallel and they do not intersect within the square. They also intersect with x=0 and x=1. Given a point I,j find the two closest lines to it. Also describe what data structures you would use to store and solve this.

 

4. Given 2 arrays of no find if each of the two arrays have the same set of integers ? Suggest a algo which can run faster than NlogN ?

 

5. I have a file in which there are supposed to be 4 billion numbers, starting from 1 to 4,000,000,000 but unfortunately one number is missing, i.e there are only 3,999,999,999 numbers, I need to find the missing number. In this question he asked me concepts like fopen, what will be the size of such a file and how such a big file will get loaded into RAM, and also concepts of logical/virtual/physical memory and memory paging.

 

6. These were also series of Questions mostly on OS skills:


-What are DLLs? Why do we use them?
-How does DLL work? Can anybody call methods written in DLLs ?
-What are static and shared Library? Which is fast and why?
-Questions about paging, loading, linking etc.
-Concept of 32-bit OS, virtual memory, inter-process communication etc.

 

7. Given a word and a file containing words in the dictionary find anagrams of that word.

 

8. Find the first unrepeated character in a string of English language in O(n).

 

9. Modified 2 color sort problem i.e. you are given an array of integers containing only 0s and 1s.You have to place all the 0s in even position and 1s in odd position. And if suppose, no. of 0s exceed no. of 1s or vice versa then keep them untouched. Do that in ONE PASS and without taking extra memory (modify the array in-place).

For Example


Input Array: {0,1,1,0,1,0,1,0,1,1,1,0,0,1,0,1,1}
Output Array: {0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1}

Write a solid secure code for it.

 

10. Given a sorted, shifted array find the minimum element. Example from 34512 (the minimum is 1), 45123 (the minimum is 1) etc.