INTERSECTION POINT BETWEEN 2 LL's - Doubt

I am getting the correct answer for 3 out 4 testcases. The 3rd testcase is coming out to be wrong. Plz check my code. https://ide.codingblocks.com/s/98659

check for this
5
1 2 3 4 5
1
5

hey @Bumblebee in line no 168, compare data instead of pointer

Thanks for the explanation

hey @Bumblebee , if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved

if ur doubt is solved mark it resolved