Linked list K-append problem

i am getting (RUN ERROR) in many test cases . please tell what is the problem in the code…

@mandeepchohan96 hey do k=k%n in starting after taking input of k to handle the case when k is greater then n.

1 Like

1 test case was showing TLE after your correction.and it was the case when K = length of LL.

@mandeepchohan96 hey then handle that case separately pls.