KAppend i am not getiing why i am not getting all the testcases correct

Hey @hrithik-1
the code u shared is not working on the testcase as well ,please share the correct code :slight_smile:

not correct

i edited the wrong code i shared in the previous text

This is the correct one

Hey @hrithik-1
k can be > n so use

   Kappend(head,k%n);

thanks it is working

1 Like

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.