Adobe Placement Paper - 5


1: Given some values draw a binary search tree from them. Take them in order given

2: A hash function was given. And few keys we had to tell which two keys map to the same location

3: find the lowest common ancestor of a bst

4: what is a doubly linked list?? Write a program to reverse a doubly linked list.

5: Given a string which contains a number in binary format. Write a program to convert that number in place to its 2's complement.

6:file 1:
int arr[10];

file 2:
extern int *arr;
foo(){
arr[0]=10;
}

what can be the problems and in what conditions?

7: A 3-d matrix was given in format a[3][2][4]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24} find **(*a+1)

8: A assembly code was given . It was too ajeeb sa .i cud not get that

9: Which is the best data structure to check correct paranthesization of an expression ?? Give reasons ?

10: In one line tell the maximum of 3 nos using tertiary operator(?:)

11: Tell diff a) void (*p)(void *a[],int n);
b) void *(*p[])(void *a,int n);
12. A Question was there in which #define sum(a,b) (a*b)
#define mult(a,b) (a)+(b)was given . Then a complex expression to solve