Append in linked list


This is showing TLE.Please help.

TLE here is because of line 38.
Replace it with while(N–)

it is showing run error

In the appendk function , you have taken a variable N which was not initialized there. Check and correct that.

Here is a reference code https://ide.codingblocks.com/s/281389 Also verify your approach

1 Like

Thanks a lot.It worked and I understood.

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.

Thankyou! It helped a lot:-)