gravatar

Blog # 20 : Microsoft Placement Paper : Subjective

1. You need to find leftmost right cousin of a node in a binary tree.

Leftmost of all the nodes present on the right side of the input node with the same height is called Leftmost Right Cousin.


2. void replace(int list[], int data, int pos)

This function takes a list of integers, an integer data, another integer pos.

It searches data in the list and after finding it, deletes the node containing data. Then it replaces the value present a index pos of the list with data.

You need to write test cases as the values of list, data, pos.


3. There is a call center. For any specific subject, there are agents. Any agent can help only one user at a time. Any agent can go to a break or full off for the day.
Answer the following:
a) Write down the agent's state machine.
b) What algorithm will you use to assign a proper agent to a user.
c) In case of the request sent by user is lost as the agent just went to the leave before getting message from server about the user. How will you handle this race condition.






p.s. : Please suggest to update any of these questions, if you find anything wrong in them.

gravatar

Nice job ! How about a blog on the facebook interview questions ?

gravatar

@ Saurabh: Please see the labels in the sidebar....you'll find it

gravatar

in Q2, was the list of no. taken as array or tree?

gravatar

these question were asked in which year

gravatar

these are the questions of this year

gravatar

Thanxs a lot 4 the questions .In question 2 ........plzz help me with test cases as i thought
1. list should contain integer elements.
2. pos sould be >=0 and <n;
3. data should be in array.

gravatar

nice post. Now you can also find latest placement papers alerts.