please check the code its not giving desired output
Error in code%%%
Hi,
in ur Intersection function, to compare 2 node, try to compare the data of 2 nodes instead of 2 nodes directly. This is because you are making new node to store both linked list so when u use node1==node2, it compares there address and not there data. So, use node1->data==node2->data to compare the data they are having.
Rest of ur code is fine.
Hope that resolves ur problem
Yes it works thanks 
Hi, I hope ur doubt was resolved.
If it was, please mark dis doubt resolved.
else if u still are facing any problem in dis question, u can post it here.
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.