Intersection_point of two linked list


what is wrong with the code it always gives -1.

hey @jaskeerat31, Make two changes in your code.

  1. in Line 23, use pass by reference for head.
  2. in Line 68, make it current1->data==current2->data instead of current1==current2

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.