Linked List -K Append

can you please explain what we have to do if value of k is greater than or equal to size of linked list with example

hi @akshatjain4545 do mod with size of list
suppose k is 1000 and n is 5 then u dont need to rotate any no of time right as it if a factor of 5 it will be eqv to 0 rotations, so after taking k as input do
k %= n;

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.

1 Like

@talhashamim001 ok sr thanks for help