this is the link to the code which I attempted but it gives runtime error
Can you please help me correct it
The code is giving runtime error
Hey @prerna_gupta31
Node*a=l1,*b=l2;//SAVE HERE
int c1 = 0,c2 = 0;
while(l1!=NULL)
{
c1++;
l1 = l1->next;
}
while(l2!=NULL)
{
c2++;
l2 = l2->next;
}
l1=a,l2=b;//REINITIALIZE HERE because above loops made them null