Time Exceeded problem

I don’t know why its showing time exceeded every-time even when i returned on the first line.

Hello @jaiswaldhruv007 i have corrected your code and noew it is passing every test case:
why you are returning temp in between and also when you are checking temp->data==temp2->data instead of that just temp==temp2 that measn there is possibility that you can find same data in the list but they are not at the intersection point so check if the node address become equal then you have to return that.
if you havea ny other doubt you can ask here:


Happy Learning!!

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.