Well my feedback for this test would be it was easy not so tough (if you had atleast prepared with basic stuff).All direct questions were there.
Set included few standard questions like to find the depth of a tree.
conversion of a hexadecimal number to integer etc,..
I know most of the people from north India staying here at bangalore wud like to get into adobe for there own reasons(near to home,gud sal etc..).
It seems like the adobe fellas are bit lazy in changing the question paper.
This paper was repeating from past 1 month, ditto paper not even a comma change.
I came to know about this after the test :( .
So this for all those desparate junta who wants to get in to adobe.
There were 2 sections one on C and other on Algorithms .
Section I:
1) WAP to check the equality of two trees
2) Draw the tree structure given an infix equation and write the postfix equation for the same
a*(b+c/d)*e-f;
3) assembly code given : we have to find whats it does. Only one register is there
Load X
MULT Y
STORE T1
LOAD T1
MULT T1
LOAD Y
ADD Z
MULT T1
STORE R
(I am not so sure about the above statements and they gave 4 choices. We have to choose among them)
4)A shared queue is there between 2 threads T1,T2 .
T1 writes in to queue and T2 reads from the queue.
T1 cannot write when the queue is full and T2 cannot read when the queue is empty.
Write an solution for this situation.
you are given following operators
createEvent
Event.setName
Event.Reset
enterCriticalSection
Leave Critical Section
Wait
etc,.
[Producer Consumer problem]
5) They gave some assembly instructions and asked to write the following c code in assembly
a=300;
for(i=10;i>0;i--)
a=a+200;
available assembly codes are push #number , add NO(adds the NO to top stack element and pushes it to stack again) ,sub,exchange ( changes the postion of 2 top numbers in stack),JNZ (tricky : loops back if the top element is non zero and Pops out the top element), duplicate – pushes a duplicate entry of top element back to stack.
6) There are some (c1….cn) computers connected by k connections. Write a algorithm to find out if all the computers are connected ?
Connections are transitive and symmetric .
( Any solutions for this question are welcome )
7) The gave a BST tree structure and u have to find the 4th smallest element in the tree…..
8)
A stack implementation was given whose size was 1….N.
Push begin v[i] : = x; i=i+1 end;
Pop begin i=i-1 x=v[i] end;
3 options were given. We need to identify which operation has to be done so that push and pop work properly.
They were something like
1)Replace statements of pop with that of push
2)Exchange statements In push and in pop.(i.e make v[i]=x as 2nd stmnt and i=i+1 as 1st stmnt.
etc…
9)WAP for Conversion of hexadecimal to integer.
You need to consider even 'a' and 'A'.
Input can be oxabc or OXAbF
10)There was a question on drawing a line from one given point to other.
You are given a function like drawpoint(double x, double y);
WAP to draw a line from point p1 to point p2.
Subscribe to:
Post Comments (Atom)
Looks like the paper is repeating since long time.....
ReplyDeleteI have seen the same question paper on web
This site says that test was taken in 2007
http://www.geekinterview.com/question_details/59921
This fella also has same set of questions..
dated 2008
http://www.chotanarad.com/threadview.aspx?subcatid=38&catid=13&Threadid=372&createdby=663&flag=2
Waah bhaiya ....Looks like some school board exam .
Paper is repeating from 3 years.
Solutions
ReplyDelete1) bool compareTrees(node *t1,node *t2)
{
if(t1==NULL)
return t1==t2;
if(t2==NULL)
return false;
return (t1->data == t2->data &&
compareTree(t1->left,t2->left) &&
compareTree(t1->right,t2->right));
}
This comment has been removed by the author.
ReplyDelete6)
ReplyDeleteSymmetric implies dat if c1 is connected to
c2 then it means dat c2 is also connected to
c1.
c1->c2 => c2->c1;
Transitive implies dat if c1,c2 are connected and c2,c3 are connected then we can say dat c1 and c3 are also connected.
c1<->c2 , c2<->c3, => c1<->c3
Question makes you to think for a while to use some mathematical properties and proceed.
But if you read the entire question carefully its actually asking for us to check whether all the computers can talk to each other or not.
Assuming dat all the computers connected can be represented in the form of a graph.
And If we are able traverse each node in the graph,then that wud be mean they are able to talk.
For traversing a graph , you can use either BFT(Breadth First Traversal) or a DFT (Depth First Traversal).
Thats it done
5) push 300;
ReplyDeletepush 10;
label Exch
Add 200; // add 200
Exch; // get the count on top
Sub -1; // decrement count
Dup // to avoid JNZ effect
JNZ label;
at the end result will be present in the stack.