p=L1
q=L2
while(p!=NULL && q!=NULL)
{int r;
r-=p->info*q->info;
p=p->next;
q=q->next;

insert(L3,r);
}

insert is the normal insert operation of linked list
On Mon, Jul 18, 2011 at 1:15 AM, swetha rahul <[email protected]>wrote:

> Hi,
>             Given 2 linked lists L1 and L2 create a linked list that gives
> the multiplication of the above 2 linked lists.
> Eg: L1 =1->5
>       L2 =1->0
>
> Ans must be 1->5->0
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Aditi Garg
Undergraduate Student
Electronics & Communication Divison
NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
Sector 3, Dwarka
New Delhi

9718388816

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to