Intersection of two linked list

one test case is showing wrong ans

Its not necessary that the elements will be in any particular sorted order. So there is no sense to compare the values of the pointers of the two lists.
Try to come up with some other approach. Else I will help you.

thanks

i’ll try with some other approach

Ok. Do tell me if you are able to get the correct answer.

i did it ,
using whlie loops.
thanks ,for the help

That’s great. @shikher_265 Please mark your doubt as resolved now.