2010 Microsoft Placement Paper:
1. A version of the "There are three persons X Y Z, one of which always lies".. etc..
2. 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.
3. Write an efficient algorithm and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
4. The if (x == 0) y = 0 etc..
5. Some more bit wise optimization at assembly level
6. C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix).
7. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list).
8. Given 3 lines of assembly code : find it is doing. IT was to find absolute value.
9. If you are on a boat and you throw out a suitcase, Will the level of water increase.
10. Print an integer using only putchar. Try doing it without using extra storage.
11. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k).
Click Here 2010 Microsoft Placement Paper:
1. A version of the "There are three persons X Y Z, one of which always lies".. etc..
2. 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.
3. Write an efficient algorithm and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
4. The if (x == 0) y = 0 etc..
5. Some more bit wise optimization at assembly level
6. C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix).
7. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list).
8. Given 3 lines of assembly code : find it is doing. IT was to find absolute value.
9. If you are on a boat and you throw out a suitcase, Will the level of water increase.
10. Print an integer using only putchar. Try doing it without using extra storage.
11. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k).
Click Here 2010 Microsoft Placement Paper:
No comments:
Post a Comment