Intersection of two likned lists

i solved it using recursion
here is the code…

Node *intersectionOfTwoLinkedLists(Node *l1, Node *l2)
{
if(l1->next==NULL || l1==NULL)
return l1;
if(l2->next->next==NULL || l2==NULL)
return l2;

Node *n1=intersectionOfTwoLinkedLists(l1->next,l2);
Node *n2=intersectionOfTwoLinkedLists(l1,l2->next);

if(n1==n2)
    return n1;

return NULL;             

}

but dont know whats wrong with it

@manthan.joshi.jiit hey please copy your code to coding blocks ide and send it here the link .

@manthan.joshi.jiit hey your logic is not upto mark please check that as you have to attach the recursion ans to the head by checking condition means there will be cases like when both head are same then include them else not. Try it you will get it.