Why my code is not woring?

Node *intersectionOfTwoLinkedLists(Node *l1, Node *l2{

Node*temp1 = l1;
Node*temp2 = l2;
while(temp1!=NULL and temp2!=NULL and temp1!=temp2){
    if(temp1 == temp2){
        return temp1;
    }
    temp1 = temp1->next;
    temp2 = temp2->next;
}
return NULL;

}

hi @pjindal393, buddy try submitting directly dont compile

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.