Home Company Questions Microsoft Interview Questions Microsoft Interview Questions - 7

Login Form




Microsoft Interview Questions - 7 Print E-mail

1. What are greedy algorithms? Give examples.

 

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 that, there are 2 linked lists L1 and L2. The algorithm finds the intersection of the two linked lists. i.e' "L1 intersection L2 " ( similar to intersection of 2 sets ). Write all the possible test cases involved in the above given problem.

 

4. Address space and fetch cycles/ Instruction Set of a processor.

 

5. How many matches will be played in a knockout tournament between 9 teams (get the general formula for n teams).

 

6. There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained after merging the above 2 arrays(i.e. array of length 2n). Full points are given for the solution bearing efficiency O(log n). Partial points for the efficiency O(n).

 

7. There is a central server and some clients connected to it. All the changes made to data occur at the server, and all the clients have just read access. You have two options:-

1. Push :- The server keeps pushing data to the clients.
2. Pull :- The client keeps requesting the server to send data.

What are the advantages and disadvantages of each type.Design a system which uses both the push as well as pull strategy.

 

8. Implement atof function.Write solid secure code only.

 

9. Given a string *Str of ASCII characters, write the pseudo code to remove the duplicate elements present in them. For example, if the given string is "Potato", then, the output has to be "Pota". Additional constraint is, the algorithm has to be in-place( no extra data structures allowed) . Extend your algorithm to remove duplicates in the string which consisted of UNICODE characters.

 

10. Implement stack using linked list.