this is my code i have getting wrong answer in 3 cases please tell what to do
Linked list k append
if(K>n) then you have to take mod with n
for this input
7
1 2 2 4 8 5 6
9
here k=9 > n
this means you have to put last 9 elements to front
after 7 list will remain same now after 2 more it becom
5 6 1 2 2 4 8
hence effectively for k>n we have to append k%n elements
correct one
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.