Pass only 2 test cases

hello @anshulgurawalia
check now->

can you please elaborate why you make K=K % n
can i check is this manner if k it is less then n then i appent the last k node.

look at the problem statement, it is mentioned that k can be greater than n as well

u need to consider both the cases (k<n & k>=n), single case alone will not work.

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.