Why is this even not working?

Why is this even not working?

hello @cbcao263

please share correct code link .
ur current link contains different code.

Sorry Sir, The Solution share is Correct But the Question is wrong.

u r not updating headA and headB inside while loop

Now, It is giving TLE.

image

put this inside while loop

Sorry Sir, It was my mistake only. Thanks

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.