Merge sorted linkedlists


what is wrong in this code plz help

I have edited your code, also using for loop in your code will lead to TLE, so avoid using that while building list, also I have added a function buildlist for that only…

1 Like

wont using while instead of for loop also give TLE?

for loop will give TLE, in case of buildlist function, so use While loop