For 4th test case this code is not working......whats wrong(intersection point of linkedlists))


If the linked lists are not intersecting at any point then print -1. you have not handled this case.
and moreover when if(temp1.data==temp2.data), you must break the loop as you need to print only one point not more.

Thanks.