GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Adobe  >  Placement Papers

 Print  |  
Question:  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)




November 11, 2006 12:05:52 #3
 Rsk   Member Since: Visitor    Total Comments: N/A 

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.

     

 

Back To Question