Don't getting where is Error?

I have thinked a logic that we delete k element from the end and add it to head one by one upto k times if k<n . here is my code (https://ide.codingblocks.com/s/103298) please tell me where i had done wrong?

why
k>=n then print head
it is wrong
u have to do k=k%n
if k>n then for some values u get the same linl list so there is no differeence so u have to do k%n so see the net effect

Still can’t under stand Let me try some another logic then i will ask you

ok if any problem persist ask :slight_smile:

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.