Error Passing all test cases in LINKED LIST-K APPEND

My code- https://ide.codingblocks.com/s/56174

not able to pass all testcases for Problem https://hack.codingblocks.com/contests/c/56/316

Handled the case for K>N and also K=0. still not able to clear.

Hey Pranav, you have handled the case when K>N incorrectly, as when K>N you are supposed to take
K = K%N;

1 Like