Adobe C Questions

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 binary 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 digits
eg a[10]={3,2,5,4,3,4,6,12,4,12,6}
the prog should 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)
This question is related to Adobe Interview

Showing Answers 1 - 14 of 14 Answers

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.

  Was this answer useful?  Yes

gh

  • Oct 7th, 2006
 

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.

  Was this answer useful?  Yes

Rsk

  • Nov 24th, 2006
 

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.

  Was this answer useful?  Yes

manasonnet

  • Jul 11th, 2008
 

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)

  Was this answer useful?  Yes

manasonnet

  • Jul 11th, 2008
 

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)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions