Re: [algogeeks] find output

2011-07-04 Thread mahesh.jnumc...@gmail.com
In while loop, the value of i will be used as 0 as it is post decrement so the value of i will decrement after the while loop is executed. so 0!=0 will fail and the value of i will get decrement and will be printed as -1. On Mon, Jul 4, 2011 at 3:54 PM, amit the cool wrote: > main() > { > int i=0

Re: [algogeeks] Re: Single linked list questions.

2011-01-06 Thread mahesh.jnumc...@gmail.com
Hii @ Question 2 - 1. Just count the no of nodes in each link list lets say N1 and N2 are the number of the nodes in first and second linklist respectively. 2. Now calculate the difference of the Nodes like as p = {N1~N2) 3. Now take 2 pointers say P1 and P2. 4. a. If N1 >N2 then put t