Monday, September 15, 2008

Adobe Interview of Manmohan

Written test for DS and C paper has changed but Quantitative and Analytical are still the same.

DS Paper:
1) Nodes are given in order, make the BST for these nodes
2) Hash function was given had to find which numbers map to the same key
3) Using Boolean operators solve a boolean expression
4) LCA for a BST write code.
5) Base conversion from a 14-base to 7-base
6) Paranthesis matching problem which DS would be best and why
stack was the answer. (tree, stack, queue, linklist were choices)
7) Prefix expression was given had to find the value for given A and B
8) Dont remember
9) Dont remember
10)Some assembly lang program was given need to find whats the behaviour of the program
It was some recursive routine.

C paper:
1) Difference between 2 statments actually they were some pointer to function
2) int *i,*j;
i = (int*) 60;
j = (int*) 20;
printf("%d",i-j);
3) Middle node of link list
4) Missing number find in array in o(n) time number in the range 1-n-1
5) Gcd or 2 numbers
6) Reverse a doubly link list
7) Call statements for a function named crazy(int n, int a, int b)
void Crazy(int n, int a, int b)
{
if(n==0)
return;
Crazy(n-1, b+n, a);
printf("%d %d %d\n", n,a,b);
Crazy(n-1, b, a+n);
}
8) Find 2's compliment of a number which is given in string form
9) MACRO were defined for SUM(a, b) and MULT(a, b)
then printf the result of some expression formed by using these MACROs
10)
file1.c
int myarray[10];

file2.c
extern int* myarray;
void foo()
{
myarray[0] = 0;
}
What problems this program might have and under what conditions?


Technical Interviews

Round1:
1) char* ftoa(float f, int d);
d: number of digits after decimal place that needs to be printed
2) Minesweeper game discussed logic and strategies
3) Tower of Hanoi for N discs, What if the disks are not sorted
4) Max subarray sum problem

Round2:
1) Levelwise traversal
2) Virtual Destructor
3) Nth node from the end of the list
4) Mirror image
5) Power of 2
6) Puzzle a rectangle is given u take out a smaller rectangle from it.
Now divide the rectangle bigger one into 2 equal parts using a single straight line.
7) A mooon shape was given and using 2 lines needed to divide it into 6 parts.
8) Question on polymorphism and other basic question on c++.
9) Container class interfaces and all what all will u have.
10) Permutation and given an API that checks if the word is valid or not.

Round3:
1) 5 5 5 5 5 = 37 puzzle
2) Reverse a link list
3) Power of 2 or not
4) Count number of 1's set bit in an integer
5) Apple, Orange and Mix Puzzle
6) C++ questions tell the output of the program
7) Find repeated number in an array of size n, numbers in the range 1-n-1
8) 8 balls one of them is lighter than others find in 2 weighings
9) What is reference and pointer

Round4:
It was an HR round very long and interesting

Round5:
1) Stack implementation, implement a queue using stack this interface
2) Spiral printing of a matrix m*n
3) Some memory manager kind of thing discussion. Memory allocator and deallocator for efficiently using the memory.

No comments:

Post a Comment