Getting Run Error in 1 Testcase
Intersection of two Linked Lists
@dsingh200021 hey Darshpreet providing a test case this time is not possible I can suggest you changes
make a intersection function which will accept two linklist
int intersection(nodea,nodeb){
node*temp=a;
while(b!=NULL){
while(a!=NULL){
if(a->data==b->data){
return a->data;
}
a=a->next;
}
a=temp;
b=b->next;
}
return-1;
}
make this changes and your code will work fine