## Recent Interview Questions

More Questions »- 0of 0 votes
You should transform an structure of multiple tree from machine A to machine B. It is a serialization and deserialization problem, but i failed to solve it well.

You could assume the struct is like this:`struct Node{ string val; vector<Node*> sons; }`

and in machine A, you will given the point to root Node, and in machine B,you should return a pointer to root Node.

- 2of 2 votes
Generate all possible sorted arrays from alternate elements of two given sorted arrays.

Given two sorted arrays A and B, generate all possible arrays such that once first element is taken from A then from B then from A and so on in increasing order till the arrays exhausted. Then first element is taken from B then From A, and do same as above.

- 0of 0 votes
Given a tree and a number N, construct another tree such that each node of the tree has either 0 or N elements,except for one node which has between 0 to N elements.Only other constraint is that ancestry is preserved in the new tree.

- 0of 0 votes
There are five classes having inheritance a,b,c,d,e. We have to solve an equation with all the possible methods defined in the above classes.We have multiply(), add(),subtract() and divide() methods in the above classes.

- 0of 0 votes
There are n persons and k different type of dishes. Each person has some preference for each dish. Either he likes it or not. We need to feed all people. Every person should get atleast one dish of his chioce. What is the minimum number of different type of dishes we can order?

Input is n x k matrix boolean matrix.For each person a row represent his likes or not likes each row.

n = 6 k = 7

1 0 0 0 1 0 0

1 0 0 0 0 1 0

1 0 0 0 0 0 1

0 1 0 0 1 0 0

0 0 1 0 0 1 0

0 0 0 1 0 0 1

Output

3

Explanation

Take dish number 5,6,7.