My code is working fine with the given test case in the question, and it is also giving the correct output, but still, it is not getting submitted properly.
Doubt Regarding Test Cases
Hello @NKushal you have to check for k if k is greater then n then you have to take mod with n because if k is 9 and n is 6 then you have to add the last 3 elements to the front because k%n i.e 9%6 is 3. but if k is equal to n then you to just print.
this is the corrected code and now passing every test case:
if you have any doubt you can ask here:
Happy Learning
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.