Run error in intersection point of two LinkedList

in one of the test case out of 4 it is showing run error my code----->>>> https://ide.codingblocks.com/s/176223

@agarwalbhavya06,
Hello Bhavya,
a)add a check p!=NULL and q!=NULL before accessing p->data and q->data
b) before printing point->data add check point!=NULL
if point equals to NULL then print -1

it worked thanks @aman212yadav

1 Like

@agarwalbhavya06 i m glad.
pls don’t forget to mark it as resolved