No such element exception in one case and 2 cases running and others are failing


What should I change in my code?

hey @Rishabh8488
try for this input
4
1 2 3 4
4
correct output is : 1 2 3 4

I cant figure out the right conditions for this question. In the function what should I do if the value of K is greater than or equal to the size of list? call the display function and return?

if the value of K is greater than or equal to the size of list?
then k = k% size