INTERSECTION OF 2 LINKLIST

I did it according to the hint but i’m still passing only 2 test cases and on compilation it shows wall time exceeded.

please tell me what’s wrong in my code?

@Arshabh hey corrected and improved your approach,please check: