Hello good morning , can u please tell me why this code satifying the test cases
hello @nmoudgil_be19 your code is failing for test case where k is greater than n .
so you have to handle that test case .
like suppose .
4 5
1 2 3 4
in this test case output should be
4234 but your output is different.
take k%n and you will be able to solve for that .
like in this case if you do 5%4 then k will be 1 and you append only 1 element from back to the front .
i hope i have cleared your doubt .
Happy Learning !!
but in question i have to reverse not append
yes right @nmoudgil_be19
but your code is not working of all the test cases .
one of them is
15 3
12 16 13 98 78 45 67 34 59 60 80 10 29 51 76
you code is producing different output from the expected output.
sorry , but i am not getting the point ,can u send me a prototype code for this question to which i can refer.
hello @nmoudgil_be19 as you are not responding i think i have cleared your doubt .
you can mark this doubt as resolved now .
on off the chance if you still have doubt you can reopen the doubt and ask again .
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.