| |
GeekInterview.com > Placement Papers > Adobe > Placement Papers
| Print | |
Question: Adobe Puzzles
Answer: Most of the problems in adobe are solved here, though it is not mentioned that they are from Adobe, so this means he has to go through them as many as possible The C/Java/quant are from bestsamplequestions.com The questions are mostly (99%) theoretical, or algo type If he is fresher then there will aloso be an apti n quant paper. Otherwiser only two papers Enginerring - based on college courses C/Java - whatever opt for - this too is theoretical Questions like what is transient variable what is finally what is the significance of package wree asked. A few of the question that were asked to me are A BST was given, find the fourth largest node Evalutae the psotfix expression Evalutae (-5) in 2's complement An expression was given , we had to make the expression tree for that and the postfix expression for that. It was something like a* ((b+c/d) *d) +e You have N computers and [Ca, Cb] means a is connected to b and this connectivity is symmetric and transitive. then write a program which checks that all computers are interconnected and talk two each other Soln : - Breadth First Search(I guess)
Some code in assembly was given and given five options. What is being calculated?
Ans (XY) 2 + Y + Z
Some commands in the assembly language were given. Then need to convert this code in assembly
Commands were like
Add- Adds top 2 elemnrts from stack and pushes the result back in to it
Sub
and others
The code is
A=300;
For (i=0 ; i<=10 ; i++)
A=A+200; Algorithm to draw a line in a 2-D axes. Given P1(x1,y1), P2(x2,y2) where x1>x2. My Soln: find the slope m and intercept c, using standard formulae Increment x2 by 1(this was given) and calculate y2' and join the dots Easy though write an algorithm, to find if two binary trees are same |
| April 04, 2008 02:34:57 |
#1 |
| doczenith |
Member Since: June 2007 Total Comments: 1 |
RE: Adobe Puzzles |
A BST was given, find the fourth largest node Ans- Do an InOrder Traversal, should give you the 4th largest node ?
write an algorithm, to find if two binary trees are same Ans - /* Compares the receiver to another tree to see if they are structurally identical. */ public boolean sameTree(BinaryTree other) { return( sameTree(root, other.root) ); } /** Recursive helper -- recurs down two trees in parallel, checking to see if they are identical. */ boolean sameTree(Node a, Node b) { // 1. both empty -> true if (a==null && b==null) return(true); // 2. both non-empty -> compare them else if (a!=null && b!=null) { return( a.data == b.data && sameTree(a.left, b.left) && sameTree(a.right, b.right) );} // 3. one empty, one not -> false else return(false); }
|
| |
Back To Question | |