I have typed my part code in the description plz check the error

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

stack<Node>s1;
stack<Node>s2;
Node*p=NULL;
while(l1!=NULL)
{
    s1.push(l1);
    l1=l1->next;
}
while(l2!=NULL)
{
    s2.push(l2);
    l2=l2->next;
}
while(s1.top()==s2.top())
{
    s1.pop();
    p=s2.top();
    s2.pop();
}
return p;

}

hello @asinghal1_be19

pls save ur complete code (code that u r submitting) here-> https://ide.codingblocks.com/

and share the link with me.

@asinghal1_be19
check now->

thanks a lot i understood my mistke

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.