Related to problem

what if k >n? according to me, the list won’t be modified is it correct?

@pradhumangupta99 take k = k%n so that k becomes smaller than n, and then solve the question normally.

Thanks for your help

@pradhumangupta99 please mark the doubt as resolved