What’s wrong with my code??
I have followed the steps given in the hints but still getting the error.
Intersection of two linked list
hello @div_yanshu07

after while loop (in line 26 and 31 ) ur head1 and head2 will be null.
so cannot use them after that while loop (they will give segmentation fault becuase they are null).
so reinitialise them with l1 , l2 after the while loop.
![]()
here condition should be
while(head1!=NULL && head2!=NULL)