Linked list k append

Why i am not getting the desired result ?


while inputting the list u were doing n-- which made n go to zero
and hence making it invalid
next i have added validations for some corner cases
like doing k = k%n for k>n and checking for null inputs etc
u can check the code, just at the end i have done head = curr instead of temp, because curr will be the new start of the list
if your doubt is solved, please mark it as resolved