Oct 27, 2010

Yahoo interview questions

Yahoo visited our campus on 26th Oct. 2010. Its selection process consists of
1. Written Objective Test
2. Coding Round
3. 2 Technical Interviews
4. 1 HR Interview

Written Objective is pretty simple. One can easily get through with sound knowledge of Data structures, Algorithms, Operating Systems, Database Management Systems and little bit Discrete Mathematics.

In coding round, two problems were given which were simple if you are a regular programmer.
First one is to implement GREP without using any API/Library that supports such functionality.

Second one was level order traversal of a binary search tree. It concerned with finding sum at each level of tree that stores integers at each node.

Technical round were not that tough.

Questions are:

In first round:

1. Print linked list in reverse order using a recursive function. A code is to be written.
2. Given any node of a linked list (but not the start node), how that node can be deleted. And what problems can be faced later?
3. Two blind people are sitting near a table top. On table, there are n head faced coins and n tail faced coins. How they can distribute such that each one have equal number of heads and tails?
4. Solve f(n) = f(n-2)+2 and f(n) = f(n/2)+2 and similar RRs.

In second round:

1. Given a linked list, odd numbered nodes are in increasing order and even numbered nodes are in decreasing order. How can linked list be sorted in increasing order?
Solution is pretty simple and is in linear time.

2. How map (in C++) guarantees search in O(logn) in worst case?

Questions are quite easy.
Still I was unable to answer few one. Solution to someone I will post in my next blog.

No comments:

Post a Comment