See this code i am getting segmen.fault
Hello @anshulgurawalia while calculating the length use the temp node because have already reached to the end of the list.
check now:
after moving to length1-length2 steps( if length1 is greater ) its obivious that the next node is the intersection of two linked list ???so why you are traversal the linked liked list
@anshulgurawalia how it is obvious it can be possible that there is much length difference but the nodes are intersecting much after that point:
can you please shown me an example ??
take this example:
1->2->3->4->5->6->7->8->19->21
10->11->12->19
can you mentioned the intersection point ?? its node having value 8 or any other node
node with value 19 is the intersection point.
got it now !! thanks
but code is not working
If i doesnot pass the input then its not compilled succesfully
@anshulgurawalia it is written that you have to just complete the function:
check this it is giving the correct ouput according to the
input:
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.

