My code is not showing output for the given test case while the output is shown in dev c ++

intersection of two linked lists

@vanshu21 Please share your code Link of coding blocks ide.

Hey @vanshu21 Can you post your code?

https://ide.codingblocks.com/s/173315 link to my code

Hey @vanshu21
Basically you’ve not considered the case, where the intersection of two linked lists is not fond and you need to print -1. You can maintain a flag variable for that, Your corrected code with these edits is 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.