Intersection linked list

Wrong output is coming

Hi

In line 71, you need to compare data of current1 and current2 and not their addresses, hence change if(current1==current2) to if(current1->data==current2->data).

Corrected Code : https://ide.codingblocks.com/s/194179

Hope it Helps.

@sulbh579

If your query is resolved, please mark it as resolved.

Thanks.

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.