GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Adobe  >  Placement Papers
Go To First  |  Previous Question  |  Next Question 
 Placement Papers  |  Question 3 of 10    Print  
1. find the nth node from end in a linked list in single parse
2. wap to check if the tree is BST
3. prove A+BC =(A+B)(A+C)
4. (A023AC5B)-(129B5321) to the base 13
5. prove that no of leaf nodes in any binaryy tree is one more than the no of nodes with degree 2
6. write a prog in assembly lang 2 calculate sum of first n natural nos
7. print values in an array with recurring didits
eg a[10]={3,2,5,4,3,4,6,12,4,12,6}
the prog shud print {3,3,5,4,4,6,6,12,12}
chk the sequence
8. write prefix and postfix notation
9. insert a node in a sorted linked list.
10. draw dfa for b* + b*a(ba)*
11. simplify a boolean expression
~a(a+b) -(b+a)(a+~b)

  
Total Answers and Comments: 6 Last Update: July 11, 2008     Asked by: Sumit 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 02, 2006 14:50:15   #1  
venugeethan Member Since: May 2006   Contribution: 3    

RE: 1. find the nth node from end in a linked list in ...
maintain 2 pointers:I st ptr---->head(1st node)2 nd ptr--->headtraverse 1 st ptr 'n' nodes from head. now traverse both the nodes till the 1 st reaches theend of list.now position on 2 nd ptr is the ans.
 
Is this answer useful? Yes | No
October 07, 2006 04:46:37   #2  
gh        

RE: 1. find the nth node from end in a linked list in ...
7-10-2006.Hi i attended Adobe test yesterday.They gave the same paper as previously posted......Shocking indeed!!!!!!!all the questions were the same....was conducted by merit trac.....attempted 22 pgms......only 5 were shortlisted.....only 1 interview.
 
Is this answer useful? Yes | No
November 24, 2006 12:05:52   #3  
Rsk        

RE: 1. find the nth node from end in a linked list in ...

Have 2 ptrs - First one traverse from the beginning till the end of the node.

Till the n traversals are over don't advance the second pointer.

so always the second pointer is n nodes behind the first. Hence when the first node reaches the end the second node is n nodes away from the end.


 
Is this answer useful? Yes | No
July 11, 2008 01:23:05   #4  
manasonnet Member Since: May 2008   Contribution: 3    

11. simplify a boolean expression~a(a+b) -(b+a)(a+~b)
Since its a Boolean Expression:-
a*a a
a*1 a
~a*a 1
~a(a+b) -(b+a)(a+~b)
>~a*a+~a*b -b*a-b*~b-a*a-a*~b
>a-ab (~a*b & -a*~b cancelled)

 
Is this answer useful? Yes | No
July 11, 2008 01:27:13   #5  
manasonnet Member Since: May 2008   Contribution: 3    

11. simplify a boolean expression~a(a+b) -(b+a)(a+~b)
Sorry by mistakely the enter key was pressed.

ans continues:-.... for Q.11

a-ab a(1-b) 0 (False) if b is TRUE
else
1(TRUE)

 
Is this answer useful? Yes | No
July 11, 2008 01:46:29   #6  
manasonnet Member Since: May 2008   Contribution: 3    

3. prove A+BC =(A+B)(A+C)
For a boolean operation
A.A A
A.1 A
A.0 0

(A+B)(A+C)
A.A+A.C+B.A+B.C
A+A(B+C)+BC
A(1+B+C)+BC
A.1+BC
A+BC

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape