Merge sorted list

https://ide.codingblocks.com/s/208108 it is not passing any test case and giving tle in one case

@Learning_bunny

I have made some changes to the compare function and made it iterative as your compare function was working only for equal length linked lists. Also some other minor changes.

Link : https://ide.codingblocks.com/s/208174

Hope it Helps.

ok but why it is giving tle

Your linked list condition might not be reaching an end, like not finding a null node or stuck in a cycle in the linked list. I leave it to you to figure this out from the hint.

Hope it Helps.

@Learning_bunny
Please mark your 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.