Please let me know the mistake in my code
Linked list k append
The code is still failing to pass test cases 2 and 3. Please help.
. … . . . . . . .
/ .
Why won’t it work for k=1 case? And how to rectify that?

becuase u are not running ur code for last node.
run till last node , and store address of last node and use it for later manipulations
I am running the loop till the last node. The condition inside while loop is tail->next!=NULL, which means it reaches last node and exits the loop. If there’s anything wrong with my understanding please correct my code and add a comment next to it.
Please help me out with the solution
check now->
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.