Linked list-k append


getting two test cases wrong

I have edited your code, basically you dont have included the test cases, when k is greater than n, so we take the mod value of k as k=k%n, instead, and if k==0 , then you will simply print the linked list else you will call append function and then you will print,
Refer to this edited code,