Monday, September 15, 2008

Adobe Interview of Ruchi Sharma

****ROUND 1****

1) Reverse a linklist.

2) Find whether two given linklists of any length merge at a point or not.

3) Print binary representation of a given integer.

4) Code to find all permutations of a given string.

5) puzzle : 5 5 5 5 5 = 37 use any arithmetic operators on LHS to make 37 .

6) puzzle:
given : -20 = -20
to prove : -4=-5.
4-5 steps were given to prove this. I had to find which step was wrong.

7) puzzle : 5 bags each having balls of same weight except one bag. find the bag having the odd ball.

8) Two C++ questions..find output.


****ROUND 2****

1) Given an integer, write code to find max and minimum value it can store.The number of bytes of the integer
is also unknown and no lib func is to be used.

2) An array has numbers in unsorted order n no fix range.any number can be repeated any number of times.
Extract unique elements from the array.

3) 4 tumblers A, B , C , and D of max capacity 10ml,10ml,4ml and 5 ml milk respectively.
make 2ml each in C and D without losing milk.

4) Discussion regarding project.


****ROUND 3****

1) Given a number N.Write a code to Print all primes in the range 2 to N.Optimise it also.

2) Given an array having positive and negative numbers. Find a contiguous sequence having max sum.

3) HAT puzzle : A team of N players, where N is at least three, are randomly assigned hats that
are equally likely to be white or black, under conditions such that:

- Each team player can see the hats of the other team members, but cannot see their own hat.
- Team members cannot communicate in any way.
- The jailor will ask each prisoner the color of his hat.
- If he got wrong ans the prisoner would be killed.

Find the strategy followed by prisoners to minize no of deaths.


4) Discussion regarding project.

No comments:

Post a Comment