Intersection point two linked list

why we need to travel abs(length of ll1-length of ll2)
is it not possible that the intersection point is present till d of the larger linked list
and why we need to move both parallely
pls explain with e.g, i used to find on other site but failed

hey @Shubham-Singh-1843190805727785, after abs(length of ll1-length of ll2) distance, length of both LL will become same after that parallel traversal will leads you to common node.

Even if intersection point is present till d of the larger linked list, you will get the correct answer. Try to dry run this case this case.

Feel free to ask any further query regarding this question.

hey @Shubham-Singh-1843190805727785,if no further query,please mark this doubt as resolved.

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.